/* ==========================================================================
   Design Tokens & Variables
   ========================================================================== */
:root {
  color-scheme: dark;

  /* Brand */
  --accent-color: #8eb0ff;
  --accent-hover: #b5cbff;
  --accent-light: rgba(105, 143, 225, 0.14);
  --accent-foreground: #ffffff;

  /* Dark theme */
  --page-background: #0b1220;
  --bg-color: rgba(18, 28, 46, 0.9);
  --bg-secondary: rgba(25, 38, 61, 0.84);
  --text-primary: #f1f5fc;
  --text-secondary: #c2cde0;
  --text-muted: #9aa9c1;
  --border-color: rgba(166, 188, 228, 0.18);
  --border-focus: #8eb0ff;
  --focus-ring: 0 0 0 3px rgba(142, 176, 255, 0.22);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.28);

  /* Typography */
  --font-heading: "Georgia", "Times New Roman", serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-size-base: 1rem;
  --line-height-base: 1.6;

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 5rem;
  --space-8: 6rem;
  --space-0_5: 0.25rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
  background-color: var(--page-background);
  background-image:
    radial-gradient(ellipse at 16% 7%, rgba(52, 86, 175, 0.19), transparent 34rem),
    radial-gradient(ellipse at 86% 39%, rgba(72, 42, 129, 0.13), transparent 36rem),
    linear-gradient(rgba(174, 196, 239, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(174, 196, 239, 0.035) 1px, transparent 1px),
    linear-gradient(145deg, #0b1220, #0d1424 54%, #0b1220);
  background-size: auto, auto, 58px 58px, 58px 58px, auto;
  background-attachment: fixed;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

main {
  width: 100%;
  min-height: 100vh;
}

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

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

p {
  margin-bottom: var(--space-2);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(1rem, 4vw, 4.5rem);
}

.section-title {
  font-size: 2rem;
  margin-bottom: var(--space-1);
}

.section-intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 600px;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-5);
}

/* ==========================================================================
   Skip Link
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--bg-color);
  color: var(--text-primary);
  padding: var(--space-1) var(--space-2);
  z-index: 10000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 17, 31, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header .logo,
.header .nav-menu > li > a {
  color: #FFFFFF;
}

.header .logo:hover,
.header .nav-menu > li > a:hover {
  color: #D9F1FF;
}

.header .hamburger-line {
  background-color: #FFFFFF;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  gap: var(--space-2);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-menu li {
  display: flex;
  align-items: center;
}

.nav-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.nav-download-cv {
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
}

.navbar .mobile-header-cv {
  display: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: var(--space-6) 0 var(--space-8);
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-color);
  margin-bottom: var(--space-2);
  padding: 0.4rem 1rem;
  background: var(--accent-light);
  border-radius: 50px;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: var(--space-3);
  color: var(--text-primary);
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  max-width: 500px;
}

.hero-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: var(--space-4);
}

.tech-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 50px;
  transition: all 0.2s ease;
}

.tech-pill:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.hero-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--accent-foreground);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.btn-resume-download {
  padding: 0.9rem 1.75rem;
  font-size: 0.95rem;
}

.btn-resume-view {
  padding: 0.9rem 1.75rem;
  font-size: 0.95rem;
}

.btn-icon {
  font-size: 1rem;
}

.hero-image {
  position: relative;
}

.profile-img {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
  border: 2px solid var(--border-color);
}

.profile-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: var(--space-3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
  padding: var(--space-7) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.about-bio {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.about-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-3);
}

.about-item h4 {
  font-size: 1rem;
  color: var(--accent-color);
  margin-bottom: var(--space-1);
}

.about-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills {
  padding: var(--space-7) 0;
  background-color: transparent;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
}

.skill-category {
  --text-primary: #f1f5fc;
  --text-secondary: #c2cde0;
  --border-color: rgba(166, 188, 228, 0.2);
  background: var(--skill-card-background);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-category:nth-child(1) {
  --skill-card-background: linear-gradient(145deg, rgba(94, 42, 74, 0.92), rgba(40, 28, 49, 0.94));
}

.skill-category:nth-child(2) {
  --skill-card-background: linear-gradient(145deg, rgba(46, 62, 91, 0.94), rgba(27, 39, 61, 0.96));
}

.skill-category:nth-child(3) {
  --skill-card-background: linear-gradient(145deg, rgba(69, 46, 82, 0.92), rgba(35, 29, 54, 0.96));
}

.skill-category:nth-child(4) {
  --skill-card-background: linear-gradient(145deg, rgba(72, 63, 43, 0.92), rgba(39, 36, 37, 0.96));
}

.skill-category:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.skill-category-title {
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-1);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-color);
}

.skill-list li:last-child {
  border-bottom: none;
}

/* ==========================================================================
   Experience Section
   ========================================================================== */
.experience {
  padding: var(--space-7) 0;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: var(--space-3);
}

.timeline::before {
  display: none;
}

.timeline-item {
  position: relative;
  min-width: 0;
}

.timeline-item::before {
  display: none;
}

.timeline-content {
  height: 100%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.timeline-type {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent-color);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-content:hover {
  transform: translateX(4px);
}

.timeline-position {
  font-size: 1.1rem;
  margin-bottom: var(--space-0_5);
  color: var(--text-primary);
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.timeline-dot {
  color: var(--accent-color);
  margin: 0 0.25rem;
  font-size: 0.8rem;
}

.timeline-duration {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
  font-style: italic;
}

.timeline-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.timeline-responsibilities {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
  padding-left: 1.2rem;
  list-style: disc;
}

.timeline-responsibilities li {
  padding-left: 0.15rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
}

.timeline-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects {
  padding: var(--space-7) 0;
}

.project-filters {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.filter-btn.active {
  background: var(--accent-color);
  color: var(--accent-foreground);
  border-color: var(--accent-color);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-3);
}

.project-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-img {
  transform: scale(1.03);
}

.project-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: var(--space-2);
  border-bottom: 1px solid var(--border-color);
}

.project-content {
  padding: var(--space-3);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.15rem;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}

.project-description {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  flex: 1;
  line-height: 1.5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: var(--space-2);
}

.project-tech span {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: var(--accent-light);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.project-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.project-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: var(--space-2);
}

/* ==========================================================================
   Education Section
   ========================================================================== */
.education {
  padding: var(--space-7) 0;
  background-color: transparent;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
}

.education-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}

.education-institution {
  font-size: 1.2rem;
  margin-bottom: var(--space-0_5);
  color: var(--text-primary);
}

.education-diploma {
  font-size: 1rem;
  color: var(--accent-color);
  margin-bottom: var(--space-1);
  font-weight: 600;
}

.education-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
  font-style: italic;
}

.education-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   Resume Section
   ========================================================================== */
.resume {
  padding: var(--space-7) 0;
}

.resume-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.resume-title {
  font-size: 1.8rem;
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}

.resume-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.resume-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.resume-note code {
  font-family: var(--font-body);
  background: var(--bg-secondary);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
}

.resume-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
  padding: var(--space-7) 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.contact-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.contact-item {
  margin-bottom: var(--space-3);
}

.contact-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-color);
  display: block;
  margin-bottom: 0.25rem;
}

.contact-value {
  font-size: 1rem;
  color: var(--text-primary);
}

.contact-value:hover {
  color: var(--accent-color);
}

.contact-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-style: italic;
}

.form-group {
  margin-bottom: var(--space-2);
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.required {
  color: var(--accent-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--focus-ring);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #d32f2f;
}

.error-message {
  display: block;
  font-size: 0.8rem;
  color: #d32f2f;
  margin-top: 0.3rem;
  min-height: 1.2rem;
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

.btn-submit {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding: var(--space-6) 0 var(--space-3);
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-4);
  align-items: start;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--space-1);
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.footer-nav a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  transition: color 0.2s ease;
}

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

.footer-social a {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  margin-right: 1rem;
  transition: color 0.2s ease;
}

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

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .hero-image {
    order: -1;
    max-width: 320px;
    margin: 0 auto var(--space-4);
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    text-align: center;
  }

  .footer-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-nav a {
    margin-bottom: 0.4rem;
  }

  .footer-social {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
  }

  .footer-social a {
    margin-right: 0;
    margin-bottom: 0;
  }

  .footer-copyright {
    text-align: center;
    margin-top: var(--space-1);
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 4.35rem;
    font-size: 0.92rem;
  }

  .container {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .header {
    box-shadow: 0 2px 12px rgba(20, 35, 70, 0.06);
  }

  .navbar {
    min-height: 3.5rem;
    padding: 0.45rem 1rem;
    gap: 0.65rem;
  }

  .logo {
    margin-right: auto;
    font-family: var(--font-body);
    font-size: 0.83rem;
    font-weight: 800;
    letter-spacing: 0.08em;
  }

  .navbar .mobile-header-cv {
    display: inline-flex;
    padding: 0.35rem 0.55rem;
    border-radius: 0.35rem;
    font-size: 0.62rem;
    white-space: nowrap;
  }

  .nav-menu {
    top: 3.5rem;
    padding: 0.5rem 1rem 1rem;
    gap: 0;
    border-radius: 0;
  }

  .nav-menu li {
    padding: 0.15rem 0;
  }

  .nav-menu .nav-cv-item {
    border-bottom: 0;
  }

  .nav-toggle {
    padding: 0.45rem;
  }

  .hero {
    min-height: 0;
    padding: 2rem 0 2.25rem;
  }

  .hero-grid {
    gap: 0.65rem;
    text-align: center;
  }

  .hero-image {
    width: 108px;
    height: 108px;
    max-width: none;
    margin: 0 auto 0.25rem;
    order: -1;
  }

  .profile-img {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-color);
    box-shadow: 0 0 0 2px var(--accent-color), var(--shadow-md);
  }

  .hero-badge {
    margin-bottom: 0.6rem;
    padding: 0.28rem 0.75rem;
    font-size: 0.62rem;
    letter-spacing: 0.07em;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 3.5rem;
    left: 0;
    right: 0;
    background: rgba(10, 17, 31, 0.98);
    flex-direction: column;
    padding: var(--space-3);
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-menu a {
    display: block;
    padding: var(--space-1) 0;
    font-size: 1rem;
  }

  .nav-download-cv {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .hero-title {
    max-width: 23rem;
    margin: 0 auto 0.65rem;
    font-size: clamp(1.55rem, 7vw, 1.9rem);
    line-height: 1.18;
  }

  .hero-description {
    max-width: 25rem;
    margin: 0 auto 0.8rem;
    font-size: 0.83rem;
    line-height: 1.55;
  }

  .hero-tech {
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
  }

  .tech-pill {
    padding: 0.2rem 0.5rem;
    font-size: 0.62rem;
  }

  .hero-actions {
    max-width: 22rem;
    margin: 0 auto;
    gap: 0.45rem;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 0.63rem 0.8rem;
    font-size: 0.78rem;
  }

  .hero-actions .btn-cv {
    display: none;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .section-intro {
    font-size: 0.76rem;
    line-height: 1.45;
  }

  .section-header {
    text-align: left;
    margin-bottom: 1rem;
  }

  .about,
  .skills,
  .experience,
  .projects,
  .education,
  .resume,
  .contact {
    padding: 1.35rem 0;
  }

  .about-bio,
  .contact-intro {
    font-size: 0.82rem;
    line-height: 1.55;
  }

  .about-details,
  .skills-grid,
  .education-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .about-item,
  .skill-category,
  .timeline-content,
  .project-card,
  .education-card,
  .resume-card,
  .contact-item,
  .contact-form-wrapper {
    border: 1px solid var(--border-color);
    border-radius: 0.7rem;
    background: var(--bg-color);
    box-shadow: var(--shadow-sm);
  }

  .about-item {
    padding: 0.75rem;
  }

  .about-item h4 {
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
  }

  .about-item p,
  .skill-list li,
  .timeline-description,
  .project-description,
  .education-description {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  .skill-category {
    background: var(--skill-card-background);
    padding: 0.8rem;
  }

  .skill-category-title {
    font-size: 0.9rem;
  }

  .skill-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .skill-list li {
    padding: 0.25rem 0.45rem;
    border: 1px solid var(--border-color);
    border-radius: 0.35rem;
    background: transparent;
  }

  .timeline {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding-left: 0;
  }

  .timeline::before {
    display: none;
  }

  .timeline-item::before {
    display: none;
  }

  .timeline-content {
    padding: 0.8rem;
  }

  .timeline-position {
    font-size: 0.9rem;
  }

  .timeline-type {
    margin-bottom: 0.45rem;
    padding: 0.18rem 0.5rem;
    font-size: 0.62rem;
  }

  .timeline-responsibilities {
    gap: 0.35rem;
    margin-top: 0.55rem;
    padding-left: 1rem;
  }

  .timeline-responsibilities li {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  .timeline-note,
  .project-note {
    font-size: 0.7rem;
    text-align: left;
  }

  .project-filters {
    justify-content: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
  }

  .filter-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.68rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .project-image {
    height: 145px;
  }

  .project-content {
    padding: 0.8rem;
  }

  .project-title {
    font-size: 0.95rem;
  }

  .project-tech {
    gap: 0.3rem;
    margin-bottom: 0.7rem;
  }

  .project-tech span {
    padding: 0.16rem 0.4rem;
    font-size: 0.62rem;
  }

  .project-actions .btn {
    flex: 1;
  }

  .education-placeholder {
    display: none;
  }

  .education-card {
    padding: 0.85rem;
  }

  .education-icon {
    font-size: 1.2rem;
  }

  .education-institution {
    font-size: 0.95rem;
  }

  .education-diploma {
    font-size: 0.8rem;
  }

  .resume-card {
    padding: 1rem;
    text-align: left;
  }

  .resume-title {
    font-size: 1.2rem;
  }

  .resume-subtitle,
  .resume-note,
  .form-note {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  .resume-actions {
    flex-direction: column;
    gap: 0.45rem;
  }

  .resume-actions .btn {
    width: 100%;
    padding: 0.65rem;
    font-size: 0.78rem;
  }

  .contact-grid {
    gap: 0.8rem;
  }

  .contact-item {
    margin-bottom: 0.55rem;
    padding: 0.65rem;
  }

  .contact-label {
    font-size: 0.65rem;
  }

  .contact-value {
    font-size: 0.78rem;
  }

  .contact-note {
    font-size: 0.65rem;
  }

  .contact-form-wrapper {
    padding: 0.8rem;
  }

  .form-group {
    margin-bottom: 0.7rem;
  }

  .form-group label,
  .form-group input,
  .form-group textarea {
    font-size: 0.76rem;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.55rem 0.65rem;
  }

  .btn-submit {
    padding: 0.7rem;
    font-size: 0.8rem;
  }

  .footer {
    padding: 1.5rem 0 1rem;
    color: var(--text-primary);
    background: var(--bg-color);
    border-top: 0;
  }

  .footer-logo,
  .footer-tagline,
  .footer-nav a,
  .footer-social a {
    color: var(--text-primary);
  }

  .footer-tagline,
  .footer-nav a,
  .footer-social a,
  .footer-copyright {
    font-size: 0.72rem;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 120;
    display: flex;
    justify-content: space-around;
    padding: 0.42rem 0.35rem calc(0.42rem + env(safe-area-inset-bottom));
    background: rgba(10, 17, 31, 0.96);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -3px 14px rgba(20, 35, 70, 0.07);
  }

  .mobile-nav-link {
    display: flex;
    min-width: 3.5rem;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    color: var(--text-muted);
    font-size: 0.58rem;
    font-weight: 600;
    line-height: 1.25;
  }

  .mobile-nav-link span {
    font-size: 1rem;
    line-height: 1;
  }

  .mobile-nav-link.active,
  .mobile-nav-link:hover {
    color: var(--accent-color);
  }

  .section-title {
    font-size: 1.2rem;
  }

  .timeline {
    padding-left: 1.5rem;
  }

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

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page-background: #111A28;
    --bg-color: #182436;
    --bg-secondary: #202F44;
    --text-primary: #F1F5FA;
    --text-secondary: #C2CDDA;
    --text-muted: #A2B0C1;
    --border-color: #35465D;
    --border-focus: #91B5FF;
    --focus-ring: 0 0 0 3px rgba(145, 181, 255, 0.22);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.22);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.28);
    --accent-color: #78A2FF;
    --accent-hover: #9AB8FF;
    --accent-light: #263753;
    --accent-foreground: #101827;
  }
}

@media (min-width: 901px) {
  body {
    font-size: clamp(1rem, 0.25vw + 0.96rem, 1.125rem);
  }

  .container {
    padding-right: clamp(1.5rem, 4vw, 4.5rem);
    padding-left: clamp(1.5rem, 4vw, 4.5rem);
  }

  .navbar {
    min-height: 5rem;
  }

  .section-title {
    font-size: clamp(2.15rem, 3vw, 3rem);
  }

  .section-intro {
    font-size: 1.08rem;
    max-width: 48rem;
  }

  .section-header {
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
  }

  .hero {
    min-height: min(88vh, 900px);
    padding: clamp(5rem, 9vw, 8rem) 0;
  }

  .hero-grid {
    gap: clamp(3rem, 7vw, 7rem);
  }

  .hero-title {
    max-width: 14ch;
    font-size: clamp(3rem, 5vw, 4.6rem);
    line-height: 1.08;
  }

  .hero-description,
  .about-bio {
    max-width: 42rem;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    line-height: 1.7;
  }

  .hero-description {
    max-width: 38rem;
  }

  .hero-image .profile-img {
    max-width: min(100%, 470px);
  }

  .hero-actions {
    gap: 0.85rem;
  }

  .hero-actions .btn,
  .btn-resume-download,
  .btn-resume-view {
    min-height: 3.25rem;
    padding: 0.9rem 1.7rem;
    font-size: 1rem;
  }

  .about,
  .skills,
  .experience,
  .projects,
  .education,
  .resume,
  .contact {
    padding: clamp(5rem, 8vw, 7rem) 0;
  }

  .about-details {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
  }

  .about-item {
    padding: 1.4rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-color);
    box-shadow: var(--shadow-sm);
  }

  .about-item h4 {
    font-size: 1.1rem;
  }

  .about-item p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .skills-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.75rem);
  }

  .skill-category {
    min-height: 19rem;
    padding: clamp(1.4rem, 2vw, 2rem);
    border-radius: 1rem;
  }

  .skill-category-title {
    font-size: clamp(1.2rem, 1.6vw, 1.5rem);
    margin-bottom: 1.25rem;
    padding-bottom: 0.8rem;
  }

  .skill-list {
    gap: 0.65rem;
  }

  .skill-list li {
    font-size: 1rem;
    padding: 0.6rem 0;
  }

  .timeline {
    padding-left: 2.5rem;
  }

  .timeline-content {
    padding: clamp(1.5rem, 3vw, 2.5rem);
  }

  .timeline-position {
    font-size: 1.45rem;
  }

  .timeline-company,
  .timeline-description {
    font-size: 1.05rem;
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
  }

  .project-image {
    height: clamp(250px, 25vw, 360px);
  }

  .project-content {
    padding: clamp(1.4rem, 2.5vw, 2rem);
  }

  .project-title {
    font-size: 1.5rem;
  }

  .project-description {
    font-size: 1rem;
    line-height: 1.65;
  }

  .project-tech span {
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
  }

  .project-actions .btn,
  .filter-btn {
    min-height: 2.8rem;
    padding: 0.65rem 1.2rem;
    font-size: 0.95rem;
  }

  .education-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 390px), 1fr));
    gap: 1.5rem;
  }

  .education-card {
    padding: clamp(1.5rem, 3vw, 2.5rem);
  }

  .education-institution {
    font-size: 1.5rem;
  }

  .education-diploma {
    font-size: 1.15rem;
  }

  .education-description {
    font-size: 1rem;
    line-height: 1.65;
  }

  .resume-card {
    padding: clamp(3rem, 7vw, 6rem);
  }

  .resume-title {
    font-size: clamp(2.2rem, 4vw, 3.25rem);
  }

  .resume-subtitle {
    font-size: 1.15rem;
  }

  .resume-note {
    font-size: 1rem;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }

  .contact-intro {
    font-size: 1.15rem;
  }

  .contact-item {
    margin-bottom: 1.25rem;
    padding: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-color);
    box-shadow: var(--shadow-sm);
  }

  .contact-label {
    font-size: 0.9rem;
  }

  .contact-value {
    font-size: 1.1rem;
  }

  .contact-note {
    font-size: 0.85rem;
  }

  .contact-form-wrapper {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-color);
    box-shadow: var(--shadow-md);
  }

  .form-group {
    margin-bottom: 1.25rem;
  }

  .form-group label,
  .form-group input,
  .form-group textarea {
    font-size: 1rem;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.85rem 1rem;
  }

  .form-note {
    font-size: 0.9rem;
  }

  .btn-submit {
    min-height: 3.25rem;
    font-size: 1.05rem;
  }

  .footer {
    padding: 4rem 0 2rem;
  }

  .footer-grid {
    gap: clamp(2rem, 4vw, 4rem);
  }

  .footer-logo {
    font-size: 1.6rem;
  }

  .footer-tagline,
  .footer-nav a,
  .footer-social a {
    font-size: 1rem;
  }
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 640px) {
  .mobile-bottom-nav {
    display: flex;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Utility for hidden placeholder images */
.profile-placeholder {
  display: none;
}

/* If no profile image exists, show placeholder */

/* ==========================================================================
   Contact Section — signature conversation layout
   ========================================================================== */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(4.5rem, 9vw, 8rem) 0;
  color: #f4f7ff;
  background:
    radial-gradient(ellipse at 14% 8%, rgba(42, 104, 235, 0.2), transparent 36rem),
    radial-gradient(ellipse at 91% 96%, rgba(16, 76, 201, 0.17), transparent 38rem),
    #0b1220;
}

.contact::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(174, 196, 239, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(174, 196, 239, 0.035) 1px, transparent 1px);
  background-size: 58px 58px;
  content: "";
  mask-image: linear-gradient(90deg, #000, transparent 85%);
}

.contact::after {
  position: absolute;
  z-index: -1;
  top: 8%;
  left: 47%;
  width: 1px;
  height: 80%;
  background: linear-gradient(transparent, rgba(174, 196, 239, 0.12), transparent);
  content: "";
  transform: rotate(24deg);
}

.contact .container {
  position: relative;
  z-index: 1;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7.5rem);
  max-width: 1320px;
  margin: 0 auto;
}

.contact-info {
  position: relative;
  padding: 1.5rem 0 1.5rem clamp(0rem, 2vw, 1.5rem);
}

.contact-eyebrow,
.form-card-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.4rem;
  color: #a9bbdf;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.contact-eyebrow > span {
  width: 1.7rem;
  height: 1px;
  background: #6d98f5;
}

.contact-heading {
  max-width: 680px;
  margin: 0 0 1.5rem;
  color: #f8faff;
  font-family: var(--font-heading);
  font-size: clamp(3rem, 5.3vw, 5.15rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.contact-heading span {
  color: #8eb0ff;
  font-style: italic;
  font-weight: 400;
}

.contact-intro {
  max-width: 29rem;
  margin: 0 0 1.6rem;
  color: #aab6cc;
  font-size: clamp(0.95rem, 1.1vw, 1.08rem);
  line-height: 1.8;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.3rem;
  margin-bottom: 2.4rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(129, 164, 240, 0.23);
  border-radius: 999px;
  background: rgba(44, 77, 137, 0.2);
  color: #d5e0f8;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.availability-indicator {
  position: relative;
  width: 0.48rem;
  height: 0.48rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #74d9a1;
  box-shadow: 0 0 13px rgba(116, 217, 161, 0.6);
}

.availability-indicator::after {
  position: absolute;
  inset: -0.22rem;
  border: 1px solid rgba(116, 217, 161, 0.5);
  border-radius: 50%;
  content: "";
  animation: availability-pulse 2.4s ease-out infinite;
}

@keyframes availability-pulse {
  0% { opacity: 0.8; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(1.7); }
}

.contact-links {
  max-width: 31rem;
  border-top: 1px solid rgba(174, 196, 239, 0.15);
}

.contact-link {
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.95rem;
  min-height: 4.65rem;
  border-bottom: 1px solid rgba(174, 196, 239, 0.15);
  color: #f4f7ff;
  text-decoration: none;
  transition: padding 220ms ease, color 220ms ease, border-color 220ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  padding-right: 0.35rem;
  padding-left: 0.35rem;
  border-color: rgba(142, 176, 255, 0.52);
  color: #b5cbff;
}

.contact-link:focus-visible {
  outline: 2px solid #8eb0ff;
  outline-offset: 3px;
}

.contact-link-icon {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border: 1px solid rgba(174, 196, 239, 0.17);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.035);
  color: #a9c1fc;
  transition: background 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.contact-link:hover .contact-link-icon {
  border-color: rgba(142, 176, 255, 0.48);
  background: rgba(83, 126, 220, 0.18);
  transform: translateY(-2px);
}

.contact-link-icon svg,
.contact-location-mark svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.contact-link-copy,
.contact-location > span:nth-child(2) {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.contact-label {
  display: block;
  margin: 0;
  color: #8c9db9;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.contact-value {
  overflow-wrap: anywhere;
  color: #f2f5fc;
  font-size: 0.9rem;
  font-weight: 500;
}

.contact-link-arrow {
  color: #8095b8;
  font-size: 1rem;
  transition: color 220ms ease, transform 220ms ease;
}

.contact-link:hover .contact-link-arrow {
  color: #b5cbff;
  transform: translate(2px, -2px);
}

.contact-location {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.65rem;
}

.contact-location-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(142, 176, 255, 0.1);
  color: #a9c1fc;
}

.contact-location .contact-value {
  font-size: 0.82rem;
}

.contact-form-wrapper {
  position: relative;
  overflow: hidden;
  padding: clamp(1.7rem, 3.4vw, 3.2rem);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 1.2rem;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(221, 232, 255, 0.75), transparent 50%),
    linear-gradient(145deg, #f7f9ff, #ffffff 72%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28), 0 2px 7px rgba(0, 0, 0, 0.1);
  color: #172238;
}

.contact-form-wrapper::before {
  position: absolute;
  top: 0;
  right: 2rem;
  width: 5rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #194fd5, #80a7ff);
  content: "";
}

.form-card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.form-card-label {
  margin: 0;
  color: #4265a8;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
}

.form-card-index {
  color: #8c99ae;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.form-card-heading {
  margin: 0 0 0.35rem;
  color: #172238;
  font-family: var(--font-heading);
  font-size: clamp(1.55rem, 2.3vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.form-card-intro {
  margin: 0 0 1.65rem;
  color: #67738a;
  font-size: 0.84rem;
}

.form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem 1rem;
}

.contact-form-wrapper .form-group {
  min-width: 0;
  margin: 0;
}

.contact-form-wrapper .form-group-message {
  grid-column: 1 / -1;
}

.contact-form-wrapper .form-group:nth-child(3) {
  grid-column: 1 / -1;
}

.contact-form-wrapper .form-group label {
  margin: 0 0 0.4rem;
  color: #35435b;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.015em;
}

.contact-form-wrapper .required {
  color: #2457cf;
}

.contact-form-wrapper .form-group input,
.contact-form-wrapper .form-group textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d7dfed;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.85);
  color: #172238;
  font-family: var(--font-body);
  font-size: 0.86rem;
  line-height: 1.45;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.contact-form-wrapper .form-group textarea {
  min-height: 6.6rem;
  resize: vertical;
}

.contact-form-wrapper .form-group input::placeholder,
.contact-form-wrapper .form-group textarea::placeholder {
  color: #8994a6;
}

.contact-form-wrapper .form-group input:focus,
.contact-form-wrapper .form-group textarea:focus {
  border-color: #4776df;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(36, 87, 207, 0.12);
}

.contact-form-wrapper .form-group input.error,
.contact-form-wrapper .form-group textarea.error {
  border-color: #c73542;
}

.contact-form-wrapper .form-group input[aria-invalid="true"]:focus,
.contact-form-wrapper .form-group textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(199, 53, 66, 0.12);
}

.contact-form-wrapper .error-message {
  min-height: 0;
  margin: 0.22rem 0 0;
  color: #b52636;
  font-size: 0.72rem;
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 1rem 0 0.4rem;
  color: #68748a;
  font-size: 0.72rem;
  line-height: 1.55;
}

.form-note-icon {
  display: grid;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 0.05rem;
  border: 1px solid #9ba9bf;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 0.65rem;
  font-weight: 700;
}

.form-status {
  min-height: 0;
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
}

.form-status:not(:empty) {
  margin: 0.55rem 0 0.75rem;
}

.form-status.is-error {
  color: #b52636;
}

.form-status.is-info {
  color: #31578d;
}

.contact-form-wrapper .btn-submit {
  display: flex;
  width: 100%;
  min-height: 3.2rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.65rem;
  padding: 0.85rem 1rem 0.85rem 1.15rem;
  border: 1px solid #1749bd;
  border-radius: 0.6rem;
  background: linear-gradient(110deg, #194fd5, #2862e5);
  box-shadow: 0 8px 18px rgba(25, 79, 213, 0.2);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 650;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.contact-form-wrapper .btn-submit:hover {
  transform: translateY(-2px);
  background: linear-gradient(110deg, #1546c3, #2159d4);
  box-shadow: 0 12px 24px rgba(25, 79, 213, 0.28);
}

.contact-form-wrapper .btn-submit:focus-visible {
  outline: 3px solid rgba(36, 87, 207, 0.3);
  outline-offset: 3px;
}

.contact-form-wrapper .btn-submit svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: transform 180ms ease;
}

.contact-form-wrapper .btn-submit:hover svg {
  transform: translateX(3px);
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 5vw, 3.5rem);
  }

  .contact-info {
    padding-left: 0;
  }

  .contact-heading {
    font-size: clamp(2.75rem, 5.5vw, 4.2rem);
  }
}

@media (max-width: 760px) {
  .contact {
    padding: 4.5rem 0;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.8rem;
    max-width: 40rem;
  }

  .contact-info {
    padding: 0;
  }

  .contact-heading {
    max-width: 35rem;
    font-size: clamp(3rem, 9vw, 4.4rem);
  }

  .contact-intro {
    max-width: 34rem;
    font-size: 0.98rem;
  }

  .availability-badge {
    margin-bottom: 1.8rem;
  }

  .contact-links {
    max-width: none;
  }

  .contact::after {
    display: none;
  }

  .contact-form-wrapper {
    padding: clamp(1.4rem, 5vw, 2.2rem);
  }

  .contact-form-wrapper .form-group label,
  .contact-form-wrapper .form-group input,
  .contact-form-wrapper .form-group textarea {
    font-size: 0.86rem;
  }
}

@media (max-width: 480px) {
  .contact {
    padding: 3.75rem 0 calc(4.5rem + 4rem);
  }

  .contact-heading {
    font-size: clamp(2.55rem, 12vw, 3.4rem);
  }

  .contact-location {
    flex-wrap: wrap;
  }

  .form-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
  }

  .contact-form-wrapper .form-group-message {
    grid-column: auto;
  }

  .form-card-top {
    align-items: flex-start;
  }

  .form-card-label {
    font-size: 0.57rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .availability-indicator::after {
    animation: none;
  }
}

/* ==========================================================================
   Education Section — editorial learning timeline
   ========================================================================== */
.education {
  position: relative;
  overflow: hidden;
  padding: clamp(4.5rem, 8vw, 7.5rem) 0;
  background: transparent;
}

.education .container {
  position: relative;
  z-index: 1;
}

.education-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(15rem, 0.6fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 6rem);
  max-width: 1120px;
  margin: 0 auto clamp(2.8rem, 5vw, 4.5rem);
}

.education-kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1rem;
  color: #9fb5e0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.education-kicker span {
  width: 1.7rem;
  height: 1px;
  background: #8eb0ff;
}

.education-title {
  margin: 0;
  color: #f4f7ff;
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 5.2vw, 4.65rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.education-title span {
  color: #8eb0ff;
  font-style: italic;
  font-weight: 400;
}

.education-intro {
  max-width: 26rem;
  margin: 0 0 0.3rem;
  color: #afbbcf;
  font-size: 0.95rem;
  line-height: 1.8;
}

.education-journey {
  position: relative;
  display: grid;
  gap: 1.15rem;
  max-width: 1120px;
  margin: 0 auto;
}

.education-journey::before {
  position: absolute;
  top: 2.5rem;
  bottom: 2.5rem;
  left: 10.25rem;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(142, 176, 255, 0.62),
    rgba(142, 176, 255, 0.2) 72%,
    rgba(142, 176, 255, 0.05)
  );
  content: "";
}

.education .education-entry {
  position: relative;
  display: grid;
  grid-template-columns: 10.25rem minmax(0, 1fr);
  gap: clamp(1.8rem, 4.5vw, 4rem);
  align-items: start;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.education-entry::before {
  position: absolute;
  z-index: 1;
  top: 2.45rem;
  left: calc(10.25rem - 0.34rem);
  width: 0.68rem;
  height: 0.68rem;
  border: 2px solid #101a2c;
  border-radius: 50%;
  background: #83a6fb;
  box-shadow: 0 0 0 4px rgba(131, 166, 251, 0.15), 0 0 18px rgba(131, 166, 251, 0.48);
  content: "";
}

.education-entry-current::before {
  background: #77d9a5;
  box-shadow: 0 0 0 4px rgba(119, 217, 165, 0.12), 0 0 16px rgba(119, 217, 165, 0.36);
}

.education-date {
  display: grid;
  justify-items: start;
  gap: 0.7rem;
  padding-top: 2.05rem;
}

.education-date-index {
  color: #8092b0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.education-date-index span {
  color: #52617c;
}

.education .education-period {
  margin: 0;
  color: #c7d4eb;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.education-period span {
  color: #7889a5;
}

.education-entry-content {
  min-width: 0;
  padding: 1.7rem 0 1.8rem;
  border-bottom: 1px solid rgba(166, 188, 228, 0.17);
  transition: padding 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.education-entry:hover .education-entry-content {
  padding-right: 0.45rem;
  padding-left: 0.45rem;
  border-color: rgba(142, 176, 255, 0.45);
}

.education-entry-featured .education-entry-content {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 3.5vw, 2.7rem);
  border: 1px solid rgba(142, 176, 255, 0.2);
  border-radius: 1rem;
  background:
    radial-gradient(ellipse at 98% 0%, rgba(76, 112, 194, 0.18), transparent 48%),
    linear-gradient(135deg, rgba(27, 42, 68, 0.8), rgba(15, 24, 41, 0.64));
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.16);
}

.education-entry-featured .education-entry-content::after {
  position: absolute;
  top: -3.3rem;
  right: -2.2rem;
  width: 9rem;
  height: 9rem;
  border: 1px solid rgba(142, 176, 255, 0.11);
  border-radius: 2rem;
  content: "";
  pointer-events: none;
  transform: rotate(35deg);
}

.education-entry-featured:hover .education-entry-content {
  padding: clamp(1.5rem, 3.5vw, 2.7rem);
  border-color: rgba(142, 176, 255, 0.38);
  transform: translateY(-2px);
}

.education-entry-topline {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.education-entry-category {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #a9bee8;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.education-entry-category svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: #8eb0ff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.education-entry-code {
  color: #687b9c;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.education .education-institution {
  position: relative;
  z-index: 1;
  margin: 0 0 0.35rem;
  color: #f5f7ff;
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.education .education-diploma {
  position: relative;
  z-index: 1;
  max-width: 47rem;
  margin: 0 0 0.8rem;
  color: #c2d2f0;
  font-size: clamp(0.93rem, 1.3vw, 1.08rem);
  font-weight: 600;
  line-height: 1.6;
}

.education .education-description {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 0;
  color: #aab8ce;
  font-size: 0.91rem;
  line-height: 1.8;
}

.education-focus {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.45rem;
}

.education-focus span {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(142, 176, 255, 0.18);
  border-radius: 999px;
  background: rgba(142, 176, 255, 0.06);
  color: #b8c9e8;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.education-entry-current .education-entry-content {
  padding-top: 1.55rem;
}

.education-entry-current:hover .education-entry-content {
  padding-top: 1.55rem;
}

.education-current {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(119, 217, 165, 0.22);
  border-radius: 999px;
  background: rgba(119, 217, 165, 0.07);
  color: #a9e8c4;
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.education-current > span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #77d9a5;
  box-shadow: 0 0 10px rgba(119, 217, 165, 0.6);
}

@media (max-width: 760px) {
  .education {
    padding: 4rem 0;
  }

  .education-heading-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
    margin-bottom: 2.25rem;
  }

  .education-intro {
    max-width: 34rem;
    font-size: 0.88rem;
  }

  .education-journey {
    gap: 1rem;
  }

  .education-journey::before {
    top: 1rem;
    bottom: 1.1rem;
    left: 0.35rem;
  }

  .education .education-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-left: 1.6rem;
  }

  .education-entry::before {
    top: 1.1rem;
    left: 0.02rem;
  }

  .education-date {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0 0 0.7rem;
  }

  .education-entry-content,
  .education-entry-current .education-entry-content {
    padding: 0 0 1.5rem;
  }

  .education-entry:hover .education-entry-content,
  .education-entry-current:hover .education-entry-content {
    padding: 0 0 1.5rem;
  }

  .education-entry-featured .education-entry-content {
    padding: 1.25rem;
  }

  .education-entry-featured:hover .education-entry-content {
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .education-title {
    font-size: clamp(2.45rem, 11vw, 3.2rem);
  }

  .education-entry-topline {
    align-items: flex-start;
  }

  .education-entry-category {
    font-size: 0.57rem;
  }

  .education-current {
    padding: 0.28rem 0.48rem;
    font-size: 0.53rem;
  }

  .education .education-institution {
    font-size: 1.75rem;
  }

  .education .education-description {
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .education-entry::before,
  .education-entry-content {
    transition: none;
  }
}

/* Center the About section copy and detail text */
.about .section-header {
  text-align: center;
}

.about .section-intro {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.about-bio {
  max-width: 58rem;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.about-item {
  text-align: center;
}
.profile-img:not([src]) + .profile-placeholder,
.profile-img[src=""] + .profile-placeholder,
.profile-img[src="assets/profile.png"] + .profile-placeholder {
  opacity: 1;
  visibility: visible;
}

/* Project placeholders */
.project-placeholder {
  display: none;
}

.project-img:not([src]) + .project-placeholder,
.project-img[src=""] + .project-placeholder,
.project-img[src*="placeholder"] + .project-placeholder {
  opacity: 1;
  visibility: visible;
}
