/* ============================================================
   Michael Corn — Portfolio
   Design: Minimalist, warm off-white, dusty blue accent
   Font: Inter (self-hosted)
   ============================================================ */

/* ── Fonts ───────────────────────────────────────────────── */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ── Reset & Base ────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #FAF9F7;
  --surface:     rgba(250, 249, 247, 0.82);
  --text-head:   #1A1A1A;
  --text-body:   #6B6B6B;
  --text-muted:  #9B9B9B;
  --accent:      #0091ff;
  --accent-soft: rgba(0, 145, 255, 0.10);
  --border:      rgba(0, 0, 0, 0.08);
  --radius:      10px;
  --nav-h:       56px;
  --max-w:       1100px;
  --max-w-prose: 640px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ── Navigation ──────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  background: transparent;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-head);
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-wordmark:hover {
  opacity: 0.6;
}

.nav-wordmark svg {
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 450;
  color: var(--text-body);
  letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-head);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
}

/* ── Page wrapper ────────────────────────────────────────── */

.page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ── Hero (index) ────────────────────────────────────────── */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  overflow: hidden;
  padding: 4rem 2rem;
  margin-top: calc(-1 * var(--nav-h));
}

/* Ambient blobs */
.blob-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 10.0;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.blob-1 {
  width: 480px;
  height: 480px;
  background: #008cff;
  top: -80px;
  left: -100px;
  animation: blob-drift-1 14s infinite alternate;
}

.blob-2 {
  width: 420px;
  height: 420px;
  background: #0091ff;
  bottom: -60px;
  right: -80px;
  animation: blob-drift-2 18s infinite alternate;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: #C9B99A;
  top: 40%;
  left: 55%;
  animation: blob-drift-3 22s infinite alternate;
}

@keyframes blob-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.08); }
  100% { transform: translate(20px, 80px) scale(0.95); }
}

@keyframes blob-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-50px, -30px) scale(1.1); }
  100% { transform: translate(-20px, -70px) scale(0.92); }
}

@keyframes blob-drift-3 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -50px) scale(1.05); }
  100% { transform: translate(-40px, 20px) scale(0.96); }
}

.blob-text-1 {
  width: 560px;
  height: 560px;
  background: #94BAD0;
  top: 50%;
  left: 50%;
  transform: translate(-58%, -52%);
  filter: blur(100px);
  opacity: 0.5;
  animation: blob-drift-text-1 16s infinite alternate;
}

.blob-text-2 {
  width: 400px;
  height: 400px;
  background: #AECFE0;
  top: 50%;
  left: 50%;
  transform: translate(-38%, -44%);
  filter: blur(90px);
  opacity: 0.4;
  animation: blob-drift-text-2 20s infinite alternate;
}

@keyframes blob-drift-text-1 {
  0%   { transform: translate(-65%, -60%) scale(1); }
  50%  { transform: translate(-60%, -55%) scale(1.06); }
  100% { transform: translate(-70%, -65%) scale(0.97); }
}

@keyframes blob-drift-text-2 {
  0%   { transform: translate(-30%, -35%) scale(1); }
  50%  { transform: translate(-35%, -40%) scale(1.08); }
  100% { transform: translate(-25%, -30%) scale(0.95); }
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-greeting {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--text-head);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.1rem;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 400;
  color: var(--text-body);
  letter-spacing: 0.01em;
}

.hero-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
}

.hero-link {
  padding: 0.65rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-head);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.hero-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.85);
}

.hero-accent-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

/* ── Intro Section (index) ───────────────────────────────── */

.intro-section {
  padding: 5rem 2rem;
}

.intro-wrap {
  max-width: var(--max-w-prose);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

.intro-bio {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-body);
  line-height: 1.75;
}

.intro-cta {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}

.intro-cta:hover {
  opacity: 0.85;
}

/* ── Section layout ──────────────────────────────────────── */

.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--text-head);
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  line-height: 1.2;
}

/* ── Projects Grid ───────────────────────────────────────── */

.projects-grid {
  display: flex;
  flex-direction: column;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem 0 2rem 1.25rem;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: padding-left 0.2s ease, border-left-color 0.2s ease;
}

.project-card:first-child {
  border-top: 1px solid var(--border);
}

.project-card:hover {
  padding-left: 1.65rem;
  border-left-color: var(--accent);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.project-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-head);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.project-link-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.2s;
  margin-top: 2px;
}

.project-card:hover .project-link-icon {
  color: var(--accent);
}

.project-card:hover .project-name {
  color: var(--accent);
  transition: color 0.2s;
}

.project-desc {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.65;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
}

/* ── Blog List ───────────────────────────────────────────── */

.blog-list {
  display: flex;
  flex-direction: column;
}

.blog-post {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: padding-left 0.2s ease;
}

.blog-post:first-child {
  border-top: 1px solid var(--border);
}

.blog-post:hover {
  padding-left: 0.4rem;
}

.blog-post-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-head);
  letter-spacing: -0.01em;
  line-height: 1.4;
  transition: color 0.2s;
}

.blog-post:hover .blog-post-title {
  color: var(--accent);
}

.blog-post-meta {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.blog-post-desc {
  font-size: 15px;
  color: var(--text-body);
  margin-top: 0.15rem;
}

.blog-empty {
  padding: 4rem 0;
  color: var(--text-muted);
  font-size: 15px;
  font-style: italic;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── Blog Post ───────────────────────────────────────────── */

.post-wrap {
  max-width: var(--max-w-prose);
}

.post-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  color: var(--text-head);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.post-meta {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.post-body {
  color: var(--text-body);
  font-size: 17px;
  line-height: 1.8;
}

.post-body h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-head);
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}

.post-body p {
  margin-bottom: 1.25rem;
}

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  transition: color 0.2s;
}

.post-back:hover {
  color: var(--text-head);
}

/* ── About ───────────────────────────────────────────────── */

.about-wrap {
  max-width: var(--max-w-prose);
  margin: 0 auto;
  padding: 5rem 2rem;
}

.about-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(20%);
  margin-bottom: 2.5rem;
  border: 1px solid var(--border);
}

.about-photo-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(123, 155, 181, 0.2);
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.about-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-head);
  letter-spacing: -0.025em;
  margin-bottom: 0.4rem;
}

.about-title {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  letter-spacing: 0.01em;
}

.about-bio {
  font-size: 17px;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 3.5rem;
}

.about-bio p + p {
  margin-top: 1.25rem;
}

/* Experience section on about page */
.experience-section {
  margin-top: 3rem;
}

.experience-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.experience-item {
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
}

.experience-item:last-child {
  border-bottom: 1px solid var(--border);
}

.experience-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}

.experience-role {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-head);
  letter-spacing: -0.01em;
}

.experience-company {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

.experience-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.experience-bullets {
  list-style: none;
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.experience-bullets li {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.65;
  padding-left: 1.1rem;
  position: relative;
}

.experience-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-size: 12px;
  top: 3px;
}

/* Social links */
.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.social-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.social-link:hover {
  color: var(--accent);
}

/* ── Footer ──────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 3rem 2rem;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 720px) {
  .nav {
    padding: 0 1.25rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 1.25rem;
  }

  .about-wrap {
    padding: 3.5rem 1.25rem;
  }

  .experience-header {
    flex-direction: column;
    gap: 0.15rem;
  }

  .intro-section {
    padding: 3.5rem 1.25rem;
  }

  .blob-1 {
    width: 320px;
    height: 320px;
  }

  .blob-2 {
    width: 280px;
    height: 280px;
  }

  .blob-3 {
    display: none;
  }
}

/* ── View Transitions ─────────────────────────────────── */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 150ms;
  animation-timing-function: ease-in-out;
}
