/*
 * Portfolio design — inspired by Lovable reference
 * Serif headings · Inter body · dark navy · teal accent
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

:root {
   --bg: hsl(220 20% 7%);
   --bg-card: hsl(220 16% 11%);
   --bg-card-hover: hsl(220 16% 13%);
   --foreground: hsl(0 0% 95%);
   --muted: hsl(215 12% 55%);
   --accent: hsl(174 72% 46%);
   --accent-dim: hsla(174, 72%, 46%, 0.15);
   --border: hsla(0, 0%, 100%, 0.08);
   --radius: 10px;
   --radius-lg: 14px;
   --font-sans: 'Inter', system-ui, sans-serif;
   --font-serif: 'Playfair Display', Georgia, serif;
   --container: 900px;
   --transition: 0.2s ease;
}

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

html {
   scroll-behavior: smooth;
}

body {
   font-family: var(--font-sans);
   font-size: 15px;
   line-height: 1.65;
   color: var(--muted);
   background: var(--bg);
   -webkit-font-smoothing: antialiased;
   margin: 0;
}

.container {
   max-width: var(--container);
   margin: 0 auto;
   padding: 0 32px;
}

.accent {
   color: var(--accent);
   font-style: normal;
}

/* ── Navigation ── */
#nav-wrap {
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   z-index: 100;
   background: hsla(220, 20%, 7%, 0.85);
   backdrop-filter: blur(12px);
   -webkit-backdrop-filter: blur(12px);
   border-bottom: 1px solid var(--border);
}

#nav-wrap.opaque {
   background: hsla(220, 20%, 7%, 0.95);
}

.nav-inner {
   display: flex;
   align-items: center;
   justify-content: space-between;
   height: 64px;
}

.nav-logo {
   font-family: var(--font-serif);
   font-size: 22px;
   font-weight: 700;
   color: var(--foreground);
   text-decoration: none;
   letter-spacing: -0.02em;
}

.nav-logo:hover {
   color: var(--accent);
}

ul#nav {
   display: flex;
   gap: 8px;
   list-style: none;
   margin: 0;
   padding: 0;
   min-height: auto;
   text-align: right;
}

ul#nav li {
   display: inline-block;
   height: auto;
   list-style: none;
}

ul#nav li a {
   font-family: var(--font-sans);
   font-size: 14px;
   font-weight: 500;
   letter-spacing: 0;
   text-transform: none;
   color: var(--muted);
   padding: 8px 14px;
   border-radius: 6px;
   text-decoration: none;
   transition: color var(--transition);
}

ul#nav li a:hover,
ul#nav li.current a {
   color: var(--foreground);
   background: transparent;
   box-shadow: none;
}

#nav-wrap > button.mobile-btn {
   display: none;
}

.mobile-btn-bar {
   display: block;
   width: 18px;
   height: 2px;
   background: var(--foreground);
   border-radius: 1px;
   transition: transform var(--transition), opacity var(--transition);
}

.mobile-btn-bar + .mobile-btn-bar {
   margin-top: 5px;
}

#nav-wrap.nav-open .mobile-btn-bar:first-child {
   transform: translateY(3.5px) rotate(45deg);
}

#nav-wrap.nav-open .mobile-btn-bar:last-child {
   transform: translateY(-3.5px) rotate(-45deg);
}

/* ── Hero ── */
header {
   position: relative;
   /* min-height: 100vh; */
   height: auto !important;
   background: var(--bg) !important;
   display: flex;
   align-items: center;
   padding: 120px 0 80px;
   overflow: visible;
   text-align: left;
}

header::before,
header::after {
   display: none;
}

.hero {
   width: 100%;
}

.hero-greeting {
   font-size: 15px;
   color: var(--muted);
   margin-bottom: 16px;
}

.hero-name {
   font-family: var(--font-serif);
   font-size: clamp(52px, 10vw, 80px);
   font-weight: 400;
   line-height: 1.05;
   letter-spacing: -0.02em;
   margin: 0 0 28px;
}

.name-first {
   color: var(--foreground);
}

.name-last {
   color: var(--accent);
   font-style: italic;
}

.hero-bio {
   font-size: 16px;
   line-height: 1.75;
   color: var(--muted);
   max-width: 540px;
   margin-bottom: 20px;
}

.hero-role {
   font-size: 15px;
   color: var(--muted);
   margin-bottom: 36px;
}

.hero-cta {
   display: flex;
   flex-wrap: wrap;
   gap: 12px;
   align-items: center;
}

.btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding: 12px 24px;
   font-family: var(--font-sans);
   font-size: 14px;
   font-weight: 500;
   text-decoration: none;
   border-radius: var(--radius);
   transition: all var(--transition);
   cursor: pointer;
   letter-spacing: 0;
   text-transform: none;
   height: auto;
   line-height: 1.4;
   margin: 0;
}

.btn-primary {
   background: var(--accent);
   color: hsl(220 20% 7%);
   border: 1px solid var(--accent);
}

.btn-primary:hover {
   background: hsl(174 72% 40%);
   border-color: hsl(174 72% 40%);
   color: hsl(220 20% 7%);
   transform: translateY(-1px);
}

.btn-ghost {
   background: transparent;
   color: var(--foreground);
   border: 1px solid var(--border);
}

.btn-ghost:hover {
   border-color: hsla(0, 0%, 100%, 0.2);
   background: hsla(0, 0%, 100%, 0.04);
   color: var(--foreground);
}

#views-counter {
   margin-top: 32px;
   font-size: 12px;
   color: hsl(215 12% 40%);
   text-transform: uppercase;
   letter-spacing: 0.06em;
}

header .scrolldown {
   display: none;
}

/* ── About ── */
#about {
   background: var(--bg);
   padding: 80px 0 48px;
   overflow: visible;
}

.about-grid {
   display: grid;
   grid-template-columns: 200px 1fr;
   gap: 48px;
   align-items: start;
   margin-bottom: 48px;
}

.profile-pic {
   width: 200px;
   height: 200px;
   border-radius: var(--radius-lg);
   object-fit: cover;
   border: none;
   box-shadow: none;
   background: var(--accent-dim);
}

.section-headline {
   font-family: var(--font-serif);
   font-size: clamp(28px, 4vw, 38px);
   font-weight: 400;
   line-height: 1.35;
   color: var(--foreground);
   margin: 0 0 24px;
   letter-spacing: -0.01em;
}

.section-headline em {
   font-style: italic;
}

.about-bio {
   font-size: 15px;
   line-height: 1.75;
   color: var(--muted);
   margin: 0;
   max-width: 560px;
}

.stats-row {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 16px;
}

.stat-card {
   background: var(--bg-card);
   border: 1px solid var(--border);
   border-radius: var(--radius);
   padding: 24px;
   text-align: center;
}

.stat-value {
   display: block;
   font-family: var(--font-serif);
   font-size: 32px;
   font-weight: 600;
   color: var(--foreground);
   line-height: 1.2;
   margin-bottom: 4px;
}

.stat-label {
   font-size: 13px;
   color: var(--muted);
}

/* ── Work ── */
#work {
   background: var(--bg);
   padding: 80px 0;
}

.section-title {
   font-family: var(--font-serif);
   font-size: clamp(32px, 5vw, 42px);
   font-weight: 400;
   font-style: italic;
   color: var(--foreground);
   margin: 0 0 48px;
   letter-spacing: -0.01em;
}

.work-entry {
   padding: 32px 0;
   border-bottom: 1px solid var(--border);
}

.work-entry:last-child {
   border-bottom: none;
}

.work-header {
   display: flex;
   justify-content: space-between;
   align-items: flex-start;
   gap: 16px;
   margin-bottom: 16px;
}

.work-company {
   font-family: var(--font-serif);
   font-size: 22px;
   font-weight: 600;
   color: var(--foreground);
   margin: 0 0 4px;
   letter-spacing: -0.01em;
}

.work-role {
   font-size: 14px;
   color: #A686E8;
   margin: 0;
}

.work-date {
   font-size: 13px;
   color: hsl(215 12% 45%);
   white-space: nowrap;
   flex-shrink: 0;
   padding-top: 6px;
}

.tech-tags {
   display: flex;
   flex-wrap: wrap;
   gap: 8px;
   margin-bottom: 16px;
}

.tag {
   display: inline-block;
   padding: 4px 12px;
   font-size: 12px;
   font-weight: 500;
   color: var(--muted);
   background: var(--bg-card);
   border: 1px solid var(--border);
   border-radius: 6px;
}

.work-achievements {
   list-style: none;
   padding: 0;
   margin: 0;
}

.work-achievements li {
   position: relative;
   padding-left: 16px;
   margin-bottom: 8px;
   font-size: 14px;
   line-height: 1.65;
   color: var(--muted);
}

.work-achievements li::before {
   content: '·';
   position: absolute;
   left: 0;
   color: var(--accent);
   font-weight: bold;
}

/* ── Skills ── */
#skills {
   background: var(--bg);
   padding: 80px 0;
   border-top: 1px solid var(--border);
}

.skills-grid {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 64px;
   align-items: start;
}

.section-title-sm {
   font-family: var(--font-serif);
   font-size: 24px;
   font-weight: 600;
   color: var(--foreground);
   margin: 0 0 28px;
   letter-spacing: -0.01em;
}

.skill-group {
   margin-bottom: 28px;
}

.skill-group:last-child {
   margin-bottom: 0;
}

.skill-category {
   font-family: var(--font-sans);
   font-size: 12px;
   font-weight: 600;
   text-transform: uppercase;
   letter-spacing: 0.08em;
   color: hsl(215 12% 45%);
   margin: 0 0 12px;
}

.projects-group {
   margin-top: 8px;
}

.project-card {
   display: block;
   background: var(--bg-card);
   border: 1px solid var(--border);
   border-radius: var(--radius);
   padding: 20px;
   text-decoration: none;
   transition: border-color var(--transition), background var(--transition);
}

.project-card:hover {
   border-color: hsla(174, 72%, 46%, 0.35);
   background: var(--bg-card-hover);
}

.project-name {
   display: block;
   font-family: var(--font-serif);
   font-size: 17px;
   font-weight: 600;
   color: var(--foreground);
   margin-bottom: 8px;
}

.project-desc {
   font-size: 14px;
   line-height: 1.6;
   color: var(--muted);
   margin: 0 0 12px;
}

.project-link {
   font-size: 13px;
   font-weight: 500;
   color: var(--accent);
}

.project-card:hover .project-link {
   text-decoration: underline;
}

.edu-cards {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 12px;
   margin-bottom: 40px;
}

.edu-card {
   background: var(--bg-card);
   border: 1px solid var(--border);
   border-radius: var(--radius);
   padding: 20px;
}

.edu-card h3 {
   font-family: var(--font-serif);
   font-size: 16px;
   font-weight: 600;
   color: var(--foreground);
   margin: 0 0 6px;
}

.edu-card p {
   font-size: 14px;
   color: var(--muted);
   margin: 0 0 8px;
   line-height: 1.5;
}

.edu-date {
   font-size: 12px;
   color: hsl(215 12% 45%);
}

.languages-heading {
   margin-top: 0;
}

.lang-bars {
   display: flex;
   flex-direction: column;
   gap: 16px;
}

.lang-row {
   display: grid;
   grid-template-columns: 90px 1fr auto;
   align-items: center;
   gap: 12px;
}

.lang-name {
   font-size: 14px;
   color: var(--foreground);
   font-weight: 500;
}

.lang-track {
   height: 4px;
   background: hsla(0, 0%, 100%, 0.08);
   border-radius: 2px;
   overflow: hidden;
}

.lang-fill {
   height: 100%;
   background: var(--accent);
   border-radius: 2px;
   opacity: 0.7;
}

.lang-level {
   font-size: 12px;
   color: hsl(215 12% 45%);
   min-width: 72px;
   text-align: right;
}

/* ── Have Fun ── */
#haveFun {
   background: var(--bg);
   padding: 80px 0;
   border-top: 1px solid var(--border);
   display: block;
}

.have-fun-container {
   max-width: var(--container);
   text-align: left;
}

.have-fun-container .section-title-sm {
   font-family: var(--font-serif);
   font-size: clamp(28px, 4vw, 36px);
   font-weight: 400;
   font-style: italic;
}

.section-subtitle {
   color: var(--muted);
   font-size: 15px;
   margin: -12px 0 32px;
   max-width: 520px;
}

.section-subtitle strong {
   color: #A686E8;
   font-weight: 600;
}

.game-credit {
   margin-top: 20px;
   font-size: 13px;
   color: hsl(215 12% 45%);
}

.game-credit a {
   color: var(--accent);
   text-decoration: none;
}

.game-credit a:hover {
   text-decoration: underline;
}

/* ── Contact ── */
#contact {
   background: var(--bg);
   padding: 100px 0 80px;
   border-top: 1px solid var(--border);
}

.contact-headline {
   font-family: var(--font-serif);
   font-size: clamp(36px, 6vw, 52px);
   font-weight: 400;
   color: var(--foreground);
   margin: 0 0 16px;
   letter-spacing: -0.02em;
   line-height: 1.2;
}

.contact-headline em {
   font-style: italic;
}

.contact-subtitle {
   font-size: 15px;
   color: var(--muted);
   margin: 0 0 40px;
   max-width: 480px;
}

.contact-cards {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 16px;
}

.contact-card {
   display: flex;
   flex-direction: column;
   gap: 8px;
   background: var(--bg-card);
   border: 1px solid var(--border);
   border-radius: var(--radius-lg);
   padding: 28px;
   text-decoration: none;
   transition: border-color var(--transition), background var(--transition);
}

a.contact-card:hover {
   border-color: hsla(174, 72%, 46%, 0.3);
   background: var(--bg-card-hover);
}

.contact-icon {
   font-size: 18px;
   color: var(--accent);
   margin-bottom: 4px;
}

.contact-label {
   font-size: 12px;
   font-weight: 600;
   text-transform: uppercase;
   letter-spacing: 0.06em;
   color: hsl(215 12% 45%);
}

.contact-value {
   font-size: 15px;
   color: var(--foreground);
   font-weight: 500;
}

/* ── Footer ── */
footer {
   background: var(--bg);
   border-top: 1px solid var(--border);
   padding: 40px 0 48px;
   text-align: center;
   position: relative;
}

.footer-inner {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 20px;
}

footer .social-links {
   display: flex;
   gap: 20px;
   list-style: none;
   margin: 0;
   padding: 0;
   font-size: 20px;
}

footer .social-links li {
   display: inline-block;
   margin: 0;
   padding: 0;
   list-style: none;
}

footer .social-links li a {
   color: var(--muted);
   transition: color var(--transition);
   display: flex;
   align-items: center;
   justify-content: center;
   width: auto;
   height: auto;
   background: none;
   border: none;
   border-radius: 0;
}

footer .social-links li a:hover {
   color: var(--accent);
   transform: none;
   background: none;
}

footer .copyright {
   font-size: 13px;
   color: hsl(215 12% 40%);
   margin: 0;
   padding: 0;
   list-style: none;
}

footer .copyright li {
   display: inline;
   list-style: none;
}

#go-top {
   display: none;
}

/* ── Fade-in ── */
.fade-in {
   opacity: 0;
   transform: translateY(16px);
   transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
   opacity: 1;
   transform: none;
}

/* ── Override legacy layout.css conflicts ── */
#about a, #about a:visited { color: var(--accent); }
#about h2 { font: inherit; color: inherit; }

/* ── Responsive ── */
@media (max-width: 768px) {
   .container {
      padding: 0 20px;
   }

   .about-grid {
      grid-template-columns: 1fr;
      gap: 32px;
   }

   .profile-pic {
      width: 140px;
      height: 140px;
   }

   .stats-row {
      grid-template-columns: 1fr;
   }

   .skills-grid {
      grid-template-columns: 1fr;
      gap: 48px;
   }

   .work-header {
      flex-direction: column;
      gap: 8px;
   }

   .work-date {
      padding-top: 0;
   }

   .contact-cards {
      grid-template-columns: 1fr;
   }

   .hero-cta {
      flex-direction: column;
      align-items: stretch;
   }

   .btn {
      text-align: center;
   }

   #nav-wrap {
      left: 0;
      right: 0;
      width: 100%;
      background: hsla(220, 20%, 7%, 0.95) !important;
   }

   #nav-wrap > button.mobile-btn:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
   }

   #nav-wrap > button.mobile-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      position: absolute;
      top: 10px;
      right: 20px;
      z-index: 110;
      width: 44px;
      height: 44px;
      padding: 0;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      cursor: pointer;
   }

   .nav-inner {
      flex-direction: column;
      align-items: stretch;
      height: auto;
      min-height: 64px;
      padding: 12px 0 0;
      gap: 0;
   }

   .nav-logo {
      padding-left: 0;
      padding-right: 56px;
   }

   ul#nav {
      display: none;
      flex-direction: column;
      width: 100%;
      gap: 0;
      padding: 4px 0 12px;
      margin-top: 8px;
      border-top: 1px solid var(--border);
   }

   #nav-wrap.nav-open ul#nav {
      display: flex;
   }

   ul#nav li {
      display: block;
      width: 100%;
   }

   ul#nav li a {
      display: block;
      padding: 14px 0;
      border-bottom: 1px solid var(--border);
      border-radius: 0;
   }

   ul#nav li:last-child a {
      border-bottom: none;
   }

   header {
      padding-top: 80px;
   }

   .edu-cards {
      grid-template-columns: 1fr;
   }

   .lang-row {
      grid-template-columns: 80px 1fr;
   }

   .lang-level {
      grid-column: 2;
      text-align: left;
      margin-top: -8px;
   }
}
