/* ── Self-hosted Lato font ── */
@font-face {
  font-family: "Lato";
  src: url("assets/fonts/lato-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("assets/fonts/lato-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("assets/fonts/lato-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("assets/fonts/lato-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #46b96c;
  --accent-hover: #3aa55d;
  --bg-dark: #0c1116;
  --bg-card: rgba(12, 17, 26, 0.55);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(70, 185, 108, 0.4);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --blur-amount: 18px;
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --font-mono: "Consolas", "Monaco", monospace;
  --font-sans: "Lato", sans-serif;
  /* Hand-drawn-style marker swipe (SVG), stretched under .about-highlight text */
  --about-marker-highlight: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20100%2012%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20fill%3D%22%2346b96c%22%20fill-opacity%3D%220.52%22%20d%3D%22M0%2C7.5%20C18%2C3.5%2038%2C9%2058%2C5.5%20C76%2C3%2092%2C7%20100%2C6.5%20L100%2C11%20C78%2C12%2048%2C11.5%2022%2C11%20L0%2C10.2%20Z%22%2F%3E%3C%2Fsvg%3E");
}

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

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

body {
  background-color: #2e2e2e;
  color: var(--text-primary);
  min-height: 100%;
  overflow-y: auto;
  font-family: var(--font-sans);
}

/* ── Inline SVG icon base ── */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  fill: currentColor;
  overflow: visible;
}

.icon-2x {
  width: 2em;
  height: 2em;
}

/* ── Skip to content (accessibility) ── */
.skip-link {
  position: absolute;
  top: -50px;
  left: 16px;
  background: var(--accent);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  z-index: 200;
  transition: top 0.3s ease;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* ── Atmospheric Canvas ── */
#atmosphere {
  background: radial-gradient(ellipse at bottom, #0c1116 0%, #161927 100%);
  position: fixed;
  left: 0;
  top: 0;
  z-index: -1;
}

#hero-fog {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}


/* ── Section base z-index ── */
.landing-page,
#about-me,
#portfolio,
#contact {
  position: relative;
  z-index: 1;
}

/* ── Landing Page ── */
.landing-page {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-image: url("assets/images/hero.jpeg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
  position: relative;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.35) 40%,
    transparent 75%
  );
  z-index: 1;
}

.social-media-icons {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 4;
  display: flex;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-media-icons a {
  color: var(--text-primary);
  font-size: 22px;
  transition: color 0.2s, transform 0.2s;
}

.social-media-icons a:hover {
  text-decoration: none;
  color: var(--accent);
  transform: translateY(-2px);
}

.landing-text {
  position: relative;
  z-index: 3;
  padding-left: clamp(40px, 8vw, 120px);
  max-width: 700px;
}

.landing-text h1 {
  font-size: clamp(3rem, 6vw, 6rem);
  font-family: var(--font-mono);
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.1;
}

.landing-text h2 {
  font-size: clamp(1.4rem, 2.5vw, 2.4rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: 4px;
}

.landing-text p {
  font-size: clamp(1rem, 1.5vw, 1.4rem);
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 30px;
  max-width: 600px;
}

/* ── Primary button (used for resume link, etc.) ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent);
  color: var(--text-primary);
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-decoration: none;
  transition: all 300ms ease;
  border: 2px solid var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(70, 185, 108, 0.3);
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px grey;
  border-radius: 2px;
}

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

/* ── Contact Section ── */
#contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 80px 24px;
  width: 100%;
}

#contact h1 {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  font-size: 2.4rem;
  margin-bottom: 24px;
}

.contact-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  margin: 0 auto;
  padding: 40px 56px;
  position: relative;
  width: 90%;
  max-width: 1020px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.form-horizontal {
  max-width: 460px;
  font-weight: 400;
}

.form-group {
  margin-bottom: 14px;
}

/* Honeypot — visually hidden from real users, still present in DOM for bots */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

.form-control,
textarea {
  display: block;
  width: 100%;
  max-width: 460px;
  padding: 12px 16px;
  font-size: 14px;
  font-family: var(--font-sans);
  line-height: 1.5;
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  transition: border-color 0.2s, background-color 0.2s;
}

.form-control:focus,
textarea:focus {
  border-color: var(--accent);
  background-color: rgba(255, 255, 255, 0.1);
  outline: none;
}

.form-control::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-family: var(--font-sans);
  letter-spacing: 1.5px;
  font-size: 12px;
}

.send-button {
  margin-top: 16px;
  width: 100%;
  padding: 14px 32px;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  color: var(--text-primary);
  font: 600 14px var(--font-sans);
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: background-color 0.25s, transform 0.15s;
  overflow: visible;
}

.send-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  border: none;
  color: var(--text-primary);
}

.alt-send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: auto;
}

.send-text {
  font: 600 13px var(--font-sans);
  letter-spacing: 2px;
  margin: 0;
}

.direct-contact-container {
  max-width: 460px;
  margin-left: 40px;
}

.direct-contact-container,
.form-horizontal {
  flex: 1;
  padding: 0;
}

.contact-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  color: rgba(255, 255, 255, 0.5);
}

.list-item .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.contact-text {
  font: 300 16px var(--font-sans);
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.place,
.phone,
.gmail {
  margin-left: 0;
}

.contact-text a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ── Contact social icons ── */
.social-media-list {
  position: relative;
  font-size: 20px;
  text-align: center;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.social-media-list li a {
  color: #fff;
}

.social-media-list li {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 48px;
  border-radius: 50%;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.25s ease-in-out;
  list-style: none;
}

.social-media-list li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 0 1px var(--border-accent);
  transition: all 0.25s ease-in-out;
}

.social-media-list li:hover {
  background-color: var(--accent);
}

.social-media-list li:hover::after {
  opacity: 1;
  transform: scale(1.15);
}

.social-media-list li:hover a {
  color: #fff;
}

hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 16px 0;
}

.contact-note {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 4px;
}

/* ── Scroll-linked section fade (see main.js --scroll-fade) ── */
:root {
  --section-fade-min-opacity: 0.2;
}

/* Opacity only — no transform on section (portfolio modals use position:fixed inside #portfolio). */
section {
  --scroll-fade: 0.35;
  opacity: calc(
    var(--section-fade-min-opacity) +
      (1 - var(--section-fade-min-opacity)) * var(--scroll-fade)
  );
}

/* Wrapper for scroll content (portfolio modals stay outside this layer). */
.section-scroll-layer {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#about-me > .section-scroll-layer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex: 1 1 auto;
  align-self: stretch;
}

#portfolio > .section-scroll-layer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0;
}

#contact > .section-scroll-layer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* Optional experiment: fog veil on .section-scroll-layer only (enable via ?fog-reveal=1) */
html.fog-reveal section {
  opacity: 1 !important;
}

html.fog-reveal .section-scroll-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
  --fog-veil: calc(1 - var(--scroll-fade, 1));
  opacity: calc(var(--fog-veil) * 0.78);
  background: linear-gradient(
    180deg,
    rgba(12, 14, 22, 0.55) 0%,
    rgba(8, 10, 18, 0.38) 42%,
    rgba(12, 14, 22, 0.52) 100%
  );
  backdrop-filter: blur(calc(var(--fog-veil) * 3px));
  -webkit-backdrop-filter: blur(calc(var(--fog-veil) * 3px));
}

@media (prefers-reduced-motion: reduce) {
  section {
    opacity: 1 !important;
    --scroll-fade: 1 !important;
  }

  html.fog-reveal .section-scroll-layer::after {
    opacity: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .about-intro h2::after {
    transition: none;
  }
}

/* ── Glass card utility ── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

/* ── About Me ── */
#about-me {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 80px 24px;
  gap: 24px;
}

/* Intro card */
.about-card {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  padding: 48px 56px;
  gap: 40px;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.about-intro {
  flex: 1;
  min-width: 0;
}

.about-intro h2 {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.about-intro h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(70, 185, 108, 0.15));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
}

.about-intro p {
  line-height: 1.7;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.about-personal {
  font-style: italic;
  color: var(--text-muted) !important;
  font-size: 0.95rem !important;
}

.about-photo {
  flex-shrink: 0;
}

.about-photo img {
  --s: 8px;
  --b: 2px;
  --w: 350px;
  --c: var(--accent);
  width: var(--w);
  aspect-ratio: 1;
  object-fit: cover;
  padding: calc(2 * var(--s));
  --_g: var(--c) var(--b), #0000 0 calc(100% - var(--b)), var(--c) 0;
  background: linear-gradient(var(--_g)) 50%/100% var(--_i, 100%) no-repeat,
    linear-gradient(90deg, var(--_g)) 50% / var(--_i, 100%) 100% no-repeat;
  outline: calc(var(--w) / 2) solid #0001;
  outline-offset: calc(var(--w) / -2 - 2 * var(--s));
  transition: 0.4s;
  cursor: pointer;
}

/* Slim “currently” strip under intro card */
.about-current-strip {
  position: relative;
  width: 100%;
  max-width: 1100px;
  padding: 0;
  overflow: hidden;
}

.about-current-strip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    var(--accent) 0%,
    rgba(70, 185, 108, 0.35) 100%
  );
}

.about-current-strip__inner {
  padding: 18px 28px 20px 32px;
}

.about-current-strip__kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.about-current-strip__status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(70, 185, 108, 0.25);
  animation: about-current-pulse 2.4s ease-in-out infinite;
}

@keyframes about-current-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.65;
    transform: scale(0.92);
  }
}

.about-current-strip__role-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em 0.65em;
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.about-current-strip__role {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.about-current-strip__connector::before {
  content: "—";
  color: var(--text-muted);
  font-weight: 400;
  margin-right: 0.65em;
}

.about-current-strip__company {
  font-family: var(--font-mono);
  font-size: 0.95em;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.about-current-strip__when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.about-current-strip__badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-accent);
  background: rgba(70, 185, 108, 0.1);
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.about-current-strip__timeline {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.about-current-strip__arrow {
  color: var(--text-muted);
  font-weight: 300;
}

.about-current-strip__present {
  color: var(--accent);
  font-weight: 600;
}

.about-current-strip__blurb {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 62ch;
}

/* Wider screens: role block left, bio right — uses horizontal space without a dead zone */
@media (min-width: 769px) {
  .about-current-strip__inner {
    display: grid;
    grid-template-columns: minmax(200px, 0.92fr) minmax(0, 1.2fr);
    column-gap: clamp(20px, 3.5vw, 40px);
    align-items: center;
  }

  .about-current-strip__lead .about-current-strip__when {
    margin-bottom: 0;
  }

  .about-current-strip__blurb {
    max-width: none;
    padding: 2px 0 2px clamp(22px, 3vw, 36px);
    margin: 0;
    border-top: none;
    border-left: 1px solid var(--border-subtle);
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-current-strip__status-dot {
    animation: none;
  }
}

/* Detail cards grid */
.about-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 1100px;
}

.detail-card {
  padding: 28px 24px;
}

#about-me .detail-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.detail-card h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Education Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-left: 16px;
  border-left: 2px solid var(--border-accent);
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.timeline-degree {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.timeline-school {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

/* Skills Pills */
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 6px 14px;
  background: rgba(70, 185, 108, 0.12);
  border: 1px solid var(--border-accent);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
  white-space: nowrap;
}

@keyframes about-pill-glow {
  0%,
  100% {
    box-shadow: none;
  }

  50% {
    box-shadow: 0 0 14px rgba(70, 185, 108, 0.4);
  }
}

/* Explicit colors — avoid `color: inherit` here: parent `.about-personal` uses
   `color: … !important`, which re-traps inherited text when spans use `inherit`. */
.about-intro p:not(.about-personal) .about-highlight {
  color: var(--text-secondary);
}

.about-personal .about-highlight {
  color: var(--text-muted);
}

.about-highlight {
  padding: 0 0.12em 0.14em;
  margin: 0 -0.04em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background-image: var(--about-marker-highlight);
  background-repeat: no-repeat;
  background-position: left calc(100% - 0.06em);
  background-size: 100% 0.5em;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

/* About section — hover (not gated on @media (hover: hover): many touch-capable
   laptops/tablets report hover: none, which hid all of these rules.) */
.about-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(18, 24, 34, 0.62);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

#about-me .detail-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(70, 185, 108, 0.12);
}

.about-intro h2:hover::after {
  transform: scaleX(1);
}

.about-photo img:hover {
  outline: var(--b) solid var(--c);
  outline-offset: calc(var(--s) / -2);
  --_i: calc(100% - 2 * var(--s));
}

.timeline-item:hover .timeline-school {
  color: var(--accent);
}

.skill-pills .pill:hover {
  animation: about-pill-glow 0.65s ease-out 1;
}

.about-highlight:hover {
  color: var(--accent) !important;
  text-shadow: 0 0 10px rgba(70, 185, 108, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  #about-me .detail-card:hover {
    transform: none;
  }

  .skill-pills .pill:hover {
    animation: none !important;
  }
}

/* Research List */
.research-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.research-list li {
  padding-left: 16px;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.research-list li::before {
  content: "\203A";
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--accent);
  font-weight: bold;
  display: block;
  transition: transform 0.22s ease, color 0.22s ease;
}

.research-list li:hover::before {
  transform: translateX(5px);
  color: var(--accent-hover);
}

.research-list li:hover {
  color: var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
  .research-list li::before {
    transition: none;
  }

  .research-list li:hover::before {
    transform: none;
    color: var(--accent);
  }
}

/* ── Vertical Navbar ── */
.vertical-navbar {
  overflow: visible;
  position: fixed;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(128, 128, 128, 0.3);
  padding: 20px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.vertical-navbar ul {
  list-style-type: none;
  padding: 0;
}

.vertical-navbar li {
  margin-bottom: 20px;
}

.vertical-navbar a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 30px;
  transition: color 0.1s ease-in-out, background 0.1s ease-in-out;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  position: relative;
  overflow: visible;
}

.vertical-navbar a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--accent);
  transform: scale(0);
  transition: transform 0.1s ease-in-out;
  z-index: 0;
}

.vertical-navbar a > * {
  position: relative;
  z-index: 2;
}

.vertical-navbar a:hover {
  color: #ffffff;
}

.vertical-navbar a:hover::before {
  transform: scale(1);
}

.vertical-navbar a::after {
  content: attr(data-description);
  position: absolute;
  top: 50%;
  right: 65px;
  transform: translateY(-50%);
  padding: 5px 10px;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  border-radius: 5px;
  font-size: 12px;
  transition: opacity 0.1s ease, right 0.1s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
  opacity: 0;
}

.vertical-navbar a:hover::after {
  opacity: 1;
}

/* Active nav state (current section) */
.vertical-navbar a.active::before {
  transform: scale(0.85);
  opacity: 0.6;
}

/* ── Landing page is always visible (no entrance animation) ── */
.landing-page {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Portfolio Section ── */
#portfolio {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 80px 24px;
}

#portfolio h1 {
  font-size: 2.6rem;
  text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  transition: transform 0.3s ease-in-out;
  margin-top: 16px;
  padding: 32px 40px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
}

.box {
  position: relative;
  width: clamp(260px, 28vw, 520px);
  height: clamp(180px, 36vh, 360px);
  cursor: pointer;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.box:hover {
  transform: scale(1.04);
  z-index: 2;
  box-shadow: 0 8px 32px var(--border-accent);
}

.image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: filter 0.3s ease-in-out;
  filter: brightness(0.92) saturate(0.9);
}

.box:hover .image {
  filter: brightness(0.35) blur(2px) saturate(0.9);
}

/* Card label — always visible at bottom */
.card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 16px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  z-index: 2;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card-label h3 {
  margin: 0;
  font-size: 1rem;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  color: var(--text-primary);
}

/* Hover overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.card-overlay p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 14px;
  max-width: 90%;
}

.box:hover .card-overlay {
  opacity: 1;
}

.box:hover .card-label {
  opacity: 0;
}

/* Touch active state for mobile */
.box.touch-active .card-overlay { opacity: 1; }
.box.touch-active .card-label { opacity: 0; }
.box.touch-active .image { filter: brightness(0.35) blur(2px) saturate(0.9); }

/* Learn More button */
.btn-learn-more {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 20px;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin: 0;
}

.btn-learn-more:hover {
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
}

/* ── Info Card backdrop scrim ── */
.info-card-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 49;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.info-card-backdrop.visible {
  opacity: 1;
}

/* ── Info Cards (portfolio detail overlays) ── */
.info-card {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44%;
  max-width: 600px;
  height: 80vh;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  flex-direction: column;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 50;
}

.info-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 35, 45, 0.95);
  border-radius: 16px;
  z-index: -1;
}

.info-card.visible {
  opacity: 1;
}

.card-image {
  width: 92%;
  flex: 0 0 35%;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  margin-top: 16px;
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 24px;
  margin-top: 16px;
  margin-bottom: 16px;
  flex: 1;
  width: 92%;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.97);
  color: #333333;
  border: 1px solid var(--border-accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
}

.card-content h3 {
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #222;
  text-align: center;
  margin-bottom: 12px;
  font-size: 1.6rem;
  margin-top: 0;
  font-family: var(--font-mono);
}

.card-content p {
  font-size: 1rem;
  line-height: 1.6;
}

.card-content button {
  margin-top: 14px;
}

/* ── Global button base ── */
button {
  background-color: var(--accent);
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 10px;
  transition-duration: 0.4s;
  font-family: var(--font-sans);
}

button:hover {
  background-color: white;
  color: black;
  border: 2px solid var(--accent);
}


/* ── Notification toast ── */
.notification-window {
  display: none;
  position: fixed;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  max-width: 50%;
  background-color: #fefefe;
  text-align: center;
  line-height: 2;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  border: 1px solid #888;
  z-index: 300;
  transition: top 0.5s ease;
  border-radius: 10px;
}

.notification-success {
  color: green;
}

.notification-error {
  color: red;
}

/* ══════════════════════════════════════
   Mobile Responsive — max-width: 768px
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  /* ── Navbar → bottom tab bar ── */
  .vertical-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    transform: none;
    flex-direction: row;
    justify-content: space-around;
    border-radius: 20px 20px 0 0;
    padding: 10px 0;
    background-color: rgba(20, 20, 30, 0.9);
  }

  .vertical-navbar ul {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-around;
  }

  .vertical-navbar li {
    margin: 0;
  }

  .vertical-navbar a {
    font-size: 22px;
    width: 44px;
    height: 44px;
  }

  .vertical-navbar a::after {
    display: none;
  }

  /* ── Landing page ── */
  .landing-page {
    background-position: 65% center;
  }

  .hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.3) 50%,
      transparent 100%
    );
  }

  .landing-text {
    padding: 0 24px;
    align-self: flex-start;
    padding-top: 100px;
  }

  .social-media-icons {
    top: 16px;
    right: 16px;
    gap: 12px;
    padding: 8px 14px;
  }

  .social-media-icons a {
    font-size: 18px;
  }

  /* ── About Me ── */
  #about-me {
    padding: 60px 16px 80px;
  }

  .about-card {
    flex-direction: column;
    padding: 24px 20px;
    text-align: center;
    gap: 20px;
  }

  .about-photo {
    order: -1;
  }

  .about-photo img {
    --w: 220px;
  }

  .about-intro {
    text-align: left;
  }

  .about-intro h2 {
    font-size: 1.6rem;
    text-align: center;
  }

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

  .about-current-strip__inner {
    display: block;
    padding: 16px 18px 18px 26px;
  }

  .about-current-strip__role-line {
    font-size: 1rem;
  }

  .about-current-strip__blurb {
    font-size: 0.85rem;
    max-width: 62ch;
    padding: 12px 0 0;
    margin: 0;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }

  /* ── Portfolio ── */
  #portfolio {
    padding: 60px 16px 80px;
  }

  #portfolio h1 {
    font-size: 1.6rem;
  }

  .gallery {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 14px;
  }

  .box {
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .box .image {
    height: 200px;
    border-radius: var(--radius-md);
  }

  /* On mobile, show descriptions always below image */
  .card-label {
    display: none;
  }

  .card-overlay {
    position: static;
    opacity: 1;
    background: transparent;
    padding: 10px 4px;
    text-align: left;
    align-items: flex-start;
  }

  .card-overlay p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 100%;
    margin-bottom: 8px;
  }

  .box:hover .image {
    filter: none;
  }

  .info-card {
    width: 92%;
    max-width: none;
    height: auto;
    max-height: 90vh;
  }

  .card-image {
    width: 100%;
    height: 22vh;
    margin-bottom: 10px;
  }

  .card-content {
    padding: 16px;
    margin-top: 16px;
    width: 92%;
  }

  .card-content p {
    font-size: 0.85rem;
  }

  .card-content h3 {
    font-size: 1.2rem;
  }

  /* ── Contact ── */
  #contact {
    padding: 60px 16px 100px;
  }

  #contact h1 {
    font-size: 1.6rem;
  }

  .contact-wrapper {
    flex-direction: column;
    padding: 24px 20px;
    align-items: center;
  }

  .direct-contact-container,
  .form-horizontal {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .direct-contact-container {
    margin-top: 20px;
    margin-left: 0;
  }

  .form-control,
  textarea {
    max-width: 100%;
  }

  .send-button {
    width: 100%;
    padding: 12px;
  }

  .social-media-list li {
    height: 42px;
    width: 42px;
  }

  .social-media-list li::after {
    width: 42px;
    height: 42px;
  }

}
