/* PRINCE JHA — PORTFOLIO CSS
   Theme: Light Editorial · Indigo + Blue */
:root {
  color-scheme: light;
  --bg: #fafaf8;
  --bg-alt: #fafaf8;    
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --nav-bg: rgba(250, 250, 248, 0.92);

  --border: #e2dfd8;
  --border-light: #ece9e3;

  --text: #111111;
  --text-muted: #7a746a;
  --text-light: #b0a99f;

  /* Primary accent — deep indigo */
  --accent: #3d37c9;
  --accent-light: #5b56d6;
  --accent-dim: rgba(61, 55, 201, 0.08);
  --accent-dim2: rgba(61, 55, 201, 0.15);
  --button-text: #ffffff;

  /* Blue accent for section labels and supporting highlights */
  --highlight-blue: #2563eb;
  --highlight-blue-dim: rgba(37, 99, 235, 0.1);

  /* Tertiary — sage green */
  --sage: #3a7d5e;

  --font-mono: 'Inter', sans-serif;
  --font-sans: 'Inter', sans-serif;
  --radius: 6px;
  --radius-lg: 12px;
  --transition: 0.22s ease;
  --nav-h: 64px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111214;
  --bg-alt: #111214;
  --surface: #1b1d21;
  --surface-2: #25282d;
  --nav-bg: rgba(17, 18, 20, 0.94);
  --border: #353941;
  --border-light: #2b2e34;
  --text: #f1f2f4;
  --text-muted: #b3b8c2;
  --text-light: #858c98;
  --accent: #aaa5ff;
  --accent-light: #c0bdff;
  --accent-dim: rgba(170, 165, 255, 0.12);
  --accent-dim2: rgba(170, 165, 255, 0.24);
  --button-text: #17152e;
  --highlight-blue: #60a5fa;
  --highlight-blue-dim: rgba(96, 165, 250, 0.16);
  --sage: #8bcfa3;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.32), 0 1px 4px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.42);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── NAVBAR ── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 1000;
  transform: translateY(0);
  transition: transform 220ms ease;
}

#navbar.nav-hidden {
  transform: translateY(-100%);
  pointer-events: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
}

.nav-logo .dot {
  color: var(--highlight-blue);
}

.theme-control {
  position: relative;
  margin-left: auto;
}

.theme-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  font: 600 0.75rem var(--font-sans);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.theme-trigger:hover,
.theme-control.is-open .theme-trigger {
  border-color: var(--accent-dim2);
  box-shadow: var(--shadow);
}

.theme-trigger:focus-visible {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.theme-caret {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--transition);
}

.theme-control.is-open .theme-caret {
  transform: translateY(1px) rotate(225deg);
}

.theme-options {
  position: absolute;
  z-index: 1100;
  top: calc(100% + 0.45rem);
  right: 0;
  width: 132px;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.theme-options::before {
  content: '';
  position: absolute;
  top: -0.45rem;
  left: 0;
  right: 0;
  height: 0.45rem;
}

.theme-control.is-open .theme-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.theme-option {
  display: block;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: calc(var(--radius) - 1px);
  background: transparent;
  color: var(--text);
  text-align: left;
  font: 500 0.75rem var(--font-sans);
  cursor: pointer;
}

.theme-option:hover,
.theme-option:focus-visible,
.theme-option[aria-pressed="true"] {
  outline: 0;
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin-left: 1.5rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text);
  transition: color var(--transition);
}

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger:hover span,
.hamburger:focus-visible span {
  background: var(--accent);
}

.hamburger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 3px;
}

.hamburger[aria-expanded="true"] span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);
}

.hamburger[aria-expanded="true"] span:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
    transform: translateX(4px);
  }

  .theme-control { margin-left: auto; margin-right: 0.75rem; }

  .nav-links {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    right: 0.75rem;
    left: auto;
    width: max-content;
    min-width: 0;
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100dvh - var(--nav-h) - 1.5rem);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    flex-direction: column;
    gap: 0;
    padding: 0.65rem 0;
    text-align: left;
    margin-left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(0.5rem);
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
  }

  .nav-links li {
    padding: 0;
  }

  .nav-links a {
    display: block;
    padding: 0.8rem 1.1rem;
    white-space: nowrap;
  }
}

/* ── HERO ── */

@media (max-width: 1000px) and (min-width: 769px) {
  .nav-links { gap: 1rem; }
}

.hero {
  min-height: min(100svh, 800px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(2.5rem, calc((100% - 1080px) / 2));
  padding-top: var(--nav-h);
  gap: 2rem;
  position: relative;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 580px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent-dim);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  border: 1px solid var(--accent-dim2);
  margin-bottom: 1.4rem;
}

.hero-name {
  font-family: var(--font-sans);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.025em;
  margin-bottom: 1.2rem;
  color: var(--text);
}

.hero-name .accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 430px;
  line-height: 1.7;
  margin-bottom: 2.2rem;
}

.hero-cta {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-block;
  padding: 0.72rem 1.6rem;
  background: var(--accent);
  color: var(--button-text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(61, 55, 201, 0.3);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(61, 55, 201, 0.38);
}

.btn-outline {
  display: inline-block;
  padding: 0.72rem 1.6rem;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  transition: border-color var(--transition), color var(--transition);
}

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

.hero-socials {
  display: flex;
  gap: 0.9rem;
}

.hero-socials a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.92rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.hero-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(61, 55, 201, 0.15);
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  flex-shrink: 0;
  z-index: 1;
}

.hero-img {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent-dim2);
  box-shadow: 0 8px 32px rgba(61, 55, 201, 0.15);
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.hero-badge {
  position: relative;
  width: 120px;
  height: 120px;
}

.badge-ring {
  position:absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.42rem;
  letter-spacing: 0.25em;
  color: var(--text-light);
  animation: spin 18s linear infinite;
  background: linear-gradient(135deg, var(--accent-dim), transparent);
}

.badge-ring span {
  position: absolute;
}

.badge-ring span:nth-child(1) {
  transform: rotate(0deg) translateY(-52px);
}

.badge-ring span:nth-child(2) {
  transform: rotate(90deg) translateY(-52px);
}

.badge-ring span:nth-child(3) {
  transform: rotate(180deg) translateY(-52px);
}

.badge-ring span:nth-child(4) {
  transform: rotate(270deg) translateY(-52px);
}

.badge-sep {
  color: var(--highlight-blue) !important;
  font-size: 0.55rem;
}

.badge-ring span:nth-child(5) {
  transform: rotate(45deg) translateY(-52px);
}

.badge-ring span:nth-child(6) {
  transform: rotate(135deg) translateY(-52px);
}

.badge-ring span:nth-child(7) {
  transform: rotate(225deg) translateY(-52px);
}

.badge-ring span:nth-child(8) {
  transform: rotate(315deg) translateY(-52px);
}

.badge-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--accent);
}

@media (max-width: 768px) {

  .hero {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1.5rem;
    padding-top: calc(var(--nav-h) + 1.5rem);
    gap: 2rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-socials {
    justify-content: center;
  }

  .hero-right {
    order: -1;
    /* puts image above text */
  }

  .hero-img {
    width: 150px;
    height: 150px;
  }

  .hero-badge {
    width: 90px;
    height: 90px;
  }

  .badge-ring span:nth-child(1) {
    transform: rotate(0deg) translateY(-38px);
  }

  .badge-ring span:nth-child(2) {
    transform: rotate(90deg) translateY(-38px);
  }

  .badge-ring span:nth-child(3) {
    transform: rotate(180deg) translateY(-38px);
  }

  .badge-ring span:nth-child(4) {
    transform: rotate(270deg) translateY(-38px);
  }

  .badge-ring span:nth-child(5) {
    transform: rotate(45deg) translateY(-38px);
  }

  .badge-ring span:nth-child(6) {
    transform: rotate(135deg) translateY(-38px);
  }

  .badge-ring span:nth-child(7) {
    transform: rotate(225deg) translateY(-38px);
  }

  .badge-ring span:nth-child(8) {
    transform: rotate(315deg) translateY(-38px);
  }
}

/* ── SECTIONS ── */
.section {
  padding: 2rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--highlight-blue);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-label::after {
  content: '';
  flex: 1;
  max-width: 48px;
  height: 1px;
  background: var(--highlight-blue);
  opacity: 0.4;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 2.5rem;
}

.section-title .accent {
  color: var(--accent);
}

.sub-heading {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.about-stats {
  display: flex;
  gap: 0;
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.1rem 0.5rem;
  border-right: 1px solid var(--border);
  text-align: center;
}

.stat:last-child {
  border-right: none;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.edu-card {
  display: flex;
  gap: 1.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.edu-card:last-child {
  border-bottom: none;
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--highlight-blue);
  min-width: 80px;
  padding-top: 0.25rem;
  letter-spacing: 0.04em;
}

.edu-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.edu-info strong {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text);
}

.edu-info span {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.edu-cgpa {
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
  color: var(--sage) !important;
  margin-top: 0.2rem;
}

/* ── SKILLS ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.skill-group:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--accent-dim2);
}

.skill-group h4 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  background: var(--bg);
  transition: all var(--transition);
}

.skill-group:hover .skill-tags span {
  border-color: var(--accent-dim2);
  color: var(--text);
}

/* ── PROJECTS ── */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.project-card {
  display: flex;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: rgba(61, 55, 201, 0.2);
}

.project-number {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--highlight-blue);
  line-height: 1;
  flex-shrink: 0;
  transition: color var(--transition);
  user-select: none;
}

.project-card:hover .project-number {
  color: var(--highlight-blue);
}

.project-body h2 {
  font-size: clamp(1.3rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 0.6rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.project-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.project-detail {
  font-size: 0.86rem !important;
}

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

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  padding: 0.2rem 0.55rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 20px;
  letter-spacing: 0.04em;
  border: 1px solid var(--accent-dim2);
}

.project-body h2 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent-dim2);
  transition: border-color var(--transition), color var(--transition);
}

.project-body h2 a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@media (max-width: 600px) {
  .project-card {
    flex-direction: column;
    gap: 1rem;
  }

  .project-number {
    font-size: 1.8rem;
  }
}

/* ── TIMELINE ── */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: 2rem;
  margin-bottom: 3.5rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.45rem;
  top: 0.4rem;
  width: 9px;
  height: 9px;
  background: var(--highlight-blue);
  border-radius: 50%;
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 0 2px var(--highlight-blue);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--highlight-blue);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.timeline-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.timeline-org {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.achievements {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem 2rem;
  box-shadow: var(--shadow-sm);
}

.achieve-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.achieve-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.achieve-item i {
  color: var(--accent);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

/* ── CONTACT ── */
.contact-sub {
  color: var(--text-muted);
  max-width: 440px;
  margin-bottom: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.contact-link:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(61, 55, 201, 0.1);
  transform: translateX(4px);
}

.contact-link i {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: var(--radius);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.contact-link div {
  display: flex;
  flex-direction: column;
}

.contact-link span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.contact-link small {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
  box-shadow: var(--shadow-sm);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
}

.form-msg {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  margin-top: 0.4rem;
  color: var(--sage);
}

/* ── FOOTER ── */
footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  color: var(--text-light);
  transition: color var(--transition);
}

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

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.reveal {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.reveal.visible {
  opacity: 1;
}

@media (max-width: 480px) {
  #navbar {
    padding: 0 1.2rem;
  }

  .hero {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }
}

/* Compact landing screen and recent writing */
#home.hero {
  min-height: 640px;
  height: 100vh;
  height: 100svh;
  max-height: 900px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas: "identity portrait" "identity posts";
  grid-template-rows: auto auto;
  align-items: center;
  align-content: center;
  justify-content: initial;
  column-gap: clamp(2rem, 6vw, 5.5rem);
  row-gap: 1rem;
  padding: calc(var(--nav-h) + 1.25rem) max(2.5rem, calc((100% - 1080px) / 2)) 2rem;
}

.hero-identity { grid-area: identity; max-width: 540px; align-self: center; transform: translateY(-0.7rem); }
.hero-identity .hero-tag { margin-bottom: 0.85rem; }
.hero-identity .hero-name { font-size: clamp(2.8rem, 5.3vw, 4.65rem); margin-bottom: 0.65rem; }
.hero-identity .hero-sub { margin-bottom: 1.2rem; }
.hero-identity .hero-cta { margin-bottom: 1.25rem; }
.hero-right { grid-area: portrait; justify-self: end; align-self: start; padding: 0 0 1.1rem; transform: translate(2px, -8px); }
.hero-img { width: clamp(145px, 17vw, 205px); height: clamp(145px, 17vw, 205px); }
.recent-posts { grid-area: posts; width: 100%; max-width: none; align-self: center; text-align: left; }
.recent-posts-title { font: 700 0.92rem var(--font-mono); letter-spacing: 0.12em; margin-bottom: 0.65rem; }
.recent-post-card { display: block; padding: 0.8rem 0 0.9rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: border-color var(--transition); }
.recent-post-card:hover { border-color: var(--accent); }
.recent-post-kicker { font: 0.65rem var(--font-mono); color: var(--highlight-blue); letter-spacing: 0.05em; }
.recent-post-card h3 { margin: 0.35rem 0; font-size: 1.12rem; line-height: 1.35; }
.recent-post-card p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.55; }
.recent-post-read, .recent-posts-all { display: inline-block; margin-top: 0.8rem; font: 0.68rem var(--font-mono); color: var(--accent); }
.recent-posts-all { margin-top: 0.65rem; }

@media (max-width: 1000px) and (min-width: 769px) {
  #home.hero { column-gap: 2rem; padding-left: 2rem; padding-right: 2rem; }
  .hero-right { padding-right: 0; transform: translate(2px, -8px); }
  .hero-img { width: 155px; height: 155px; }
}

@media (max-width: 768px) {
  #home.hero { height: auto; max-height: none; min-height: 0; display: grid; grid-template-columns: 1fr; grid-template-areas: "portrait" "identity" "posts"; gap: 1.4rem; padding: calc(var(--nav-h) + 1.75rem) 1.5rem 2.5rem; text-align: center; }
  .hero-identity { max-width: 620px; justify-self: center; transform: none; }
  .hero-identity .hero-name { font-size: clamp(2.8rem, 12vw, 4rem); }
  .hero-identity .hero-cta, .hero-identity .hero-socials { justify-content: center; }
.hero-right { justify-self: center; padding: 0; align-self: center; transform: none; }
  .hero-img { width: 130px; height: 130px; }
  .recent-posts { max-width: 620px; justify-self: center; text-align: left; margin-top: 1rem; }
}

/* Compact homepage layout inspired by the reference */
#navbar {
  padding: 0 max(1.5rem, calc((100% - 1120px) / 2));
}

#home.hero {
  width: 100%;
  max-width: 1120px;
  min-height: min(100svh, 800px);
  height: auto;
  max-height: none;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  grid-template-areas: "identity portrait" "posts posts";
  grid-template-rows: auto auto;
  align-items: center;
  align-content: start;
  column-gap: clamp(2.5rem, 8vw, 7rem);
  row-gap: clamp(2rem, 5vh, 3rem);
  padding: calc(var(--nav-h) + 2.2rem) 1.5rem 2rem;
}

.hero-identity {
  max-width: 680px;
  align-self: center;
  transform: none;
}

.hero-identity .hero-tag { margin-bottom: 0.55rem; }
.hero-identity .hero-name {
  font-size: clamp(3.2rem, 7vw, 5rem);
  margin-bottom: 0.45rem;
}
.hero-identity .hero-sub {
  max-width: 620px;
  margin-bottom: 1rem;
}
.hero-identity .hero-cta { margin-bottom: 0; }
.hero-identity .hero-socials { margin-top: 0.8rem; }

.hero-right {
  align-self: center;
  justify-self: end;
  padding: 0;
  transform: none;
}

.hero-img {
  width: clamp(155px, 17vw, 205px);
  height: clamp(155px, 17vw, 205px);
}

.recent-posts {
  grid-area: posts;
  width: 100%;
  max-width: none;
  align-self: start;
  text-align: left;
}

.recent-posts-title {
  font-size: clamp(1.8rem, 3.6vw, 2.65rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.recent-post-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.recent-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent-dim2);
}

.recent-post-card:focus-visible,
.recent-posts-all:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.recent-post-kicker { font: 0.65rem var(--font-mono); color: var(--highlight-blue); letter-spacing: 0.05em; }
.recent-post-card h3 { margin: 0.4rem 0; font-size: 1.2rem; line-height: 1.35; }
.recent-post-card p { max-width: 760px; color: var(--text-muted); font-size: 0.88rem; line-height: 1.55; }
.recent-post-read,
.recent-posts-all { display: inline-block; color: var(--accent); font: 0.72rem var(--font-mono); }
.recent-post-read { margin-top: auto; padding-top: 0.8rem; }
.recent-posts-all { margin-top: 0.85rem; }

@media (max-width: 900px) and (min-width: 769px) {
  #home.hero { column-gap: 2rem; padding-left: 2rem; padding-right: 2rem; }
  .hero-img { width: 155px; height: 155px; }
}

@media (max-width: 768px) {
  #navbar { padding: 0 1.2rem; }
  #home.hero {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-areas: "portrait" "identity" "posts";
    gap: 1.5rem;
    padding: calc(var(--nav-h) + 1.5rem) 1.5rem 2rem;
    text-align: center;
  }
  .hero-right { justify-self: center; }
  .hero-img { width: 130px; height: 130px; }
  .hero-identity { justify-self: center; }
  .hero-identity .hero-name { font-size: clamp(2.8rem, 12vw, 4rem); }
  .hero-identity .hero-cta,
  .hero-identity .hero-socials { justify-content: center; }
  .recent-posts { max-width: 620px; justify-self: center; text-align: left; }
  .recent-post-card { min-height: 175px; }
}

@media (min-width: 769px) and (max-height: 720px) {
  #home.hero {
    padding-top: calc(var(--nav-h) + 1rem);
    padding-bottom: 1.25rem;
    row-gap: 1.25rem;
  }
  .hero-img { width: 140px; height: 140px; }
  .recent-posts-title { margin-bottom: 0.65rem; }
  .recent-post-card { min-height: 160px; padding: 1rem 1.2rem; }
  .recent-posts-all { margin-top: 0.55rem; }
}

@media (max-width: 768px) and (max-height: 720px) {
  #home.hero {
    gap: 0.9rem;
    padding-top: calc(var(--nav-h) + 0.65rem);
    padding-bottom: 1rem;
  }
  .hero-img { width: 100px; height: 100px; }
  .hero-identity .hero-tag { margin-bottom: 0.25rem; }
  .hero-identity .hero-name { font-size: clamp(2.4rem, 10vw, 3.2rem); margin-bottom: 0.25rem; }
  .hero-identity .hero-sub { margin-bottom: 0.5rem; }
  .hero-identity .hero-socials { margin-top: 0.5rem; }
  .recent-posts-title { margin-bottom: 0.5rem; }
  .recent-post-card { min-height: 145px; padding: 0.85rem 1rem; }
  .recent-post-card h3 { margin: 0.25rem 0; font-size: 1.05rem; }
  .recent-post-read { padding-top: 0.4rem; }
  .recent-posts-all { margin-top: 0.4rem; }
}

@media (min-width: 1200px) {
  .container {
    width: min(94vw, 1600px);
    max-width: none;
  }

  #navbar {
    padding-left: max(3vw, calc((100% - 1600px) / 2));
    padding-right: max(3vw, calc((100% - 1600px) / 2));
  }

  #home.hero { max-width: min(94vw, 1600px); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

}
