
/* =========================================
   01. THEME VARIABLES
   ========================================= */

:root {
  color-scheme: dark;

  --bg: #0b1020;
  --surface: #151c30;
  --surface-alt: #10182a;

  --text: #f3f5ff;
  --muted: #aab5d0;
  --border: #303c58;

  --accent: #7c83ff;
  --highlight: #38bdf8;

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f7f9ff;
  --surface: #ffffff;
  --surface-alt: #eef2fc;

  --text: #18223b;
  --muted: #52617d;
  --border: #d9e0ee;

  --accent: #575cda;
  --highlight: #087ca9;

  --shadow: 0 18px 50px rgba(40, 55, 100, 0.08);
}


/* =========================================
   02. RESET & BASE STYLES
   ========================================= */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);

  font: 16px/1.65 Inter, ui-sans-serif, system-ui,
    -apple-system, "Segoe UI", sans-serif;

  transition: background 0.25s, color 0.25s;
}

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

button {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--highlight);
  outline-offset: 4px;
}


/* =========================================
   03. REUSABLE LAYOUT UTILITIES
   ========================================= */

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 105px 0;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 50;

  background: var(--accent);
  color: #ffffff;
  padding: 8px 12px;
}

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


/* =========================================
   04. HEADER & NAVIGATION
   ========================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;

  background: color-mix(
    in srgb,
    var(--bg) 88%,
    transparent
  );

  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  font-size: 1.6rem;
  font-weight: 850;
  letter-spacing: -0.06em;
}

.brand span {
  color: var(--accent);
}

.nav-actions,
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
}

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

.icon-button {
  width: 40px;
  height: 40px;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--surface);
  color: var(--text);

  cursor: pointer;
}

.menu-toggle {
  display: none;
}


/* =========================================
   05. HERO SECTION
   ========================================= */

.hero {
  min-height: calc(100svh - 76px);

  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 75px;

  padding-block: 90px;
}

.eyebrow {
  margin: 0 0 18px;

  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}


.hero h1 {
  margin: 0 0 18px;

  font-size: clamp(2rem, 3.5vw, 3.5rem);
  letter-spacing: -0.075em;
  line-height: 1.1;

  white-space: nowrap;
}


.gradient-text {
  background: linear-gradient(
    110deg,
    var(--accent),
    var(--highlight)
  );

  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-role {
  margin: 0 0 18px;

  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 700;
}

.lead {
  max-width: 570px;
  margin: 0;

  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 46px;
  padding: 10px 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;

  border-radius: 12px;
  font-size: 0.91rem;
  font-weight: 700;

  transition:
    transform 0.2s,
    background 0.2s,
    border-color 0.2s;
}

.button:hover {
  transform: translateY(-3px);
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-outline {
  border: 1px solid var(--border);
}

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


/* =========================================
   06. HERO PORTRAIT
   ========================================= */

.hero-visual {
  position: relative;
  max-width: 430px;
  width: 100%;
  margin: auto;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 5%;

  background: linear-gradient(
    145deg,
    var(--accent),
    var(--highlight)
  );

  filter: blur(75px);
  opacity: 0.25;
}

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 12px;

  border: 1px solid var(--border);
  border-radius: 30px;

  background: linear-gradient(
    140deg,
    color-mix(in srgb, var(--accent) 40%, var(--surface)),
    var(--surface)
  );

  box-shadow: var(--shadow);
}

.portrait-placeholder {
  height: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border-radius: 22px;

  background: linear-gradient(
    145deg,
    var(--surface),
    var(--surface-alt)
  );

  color: var(--muted);
  text-align: center;
}

.portrait-placeholder span {
  color: var(--accent);
  font-size: 7rem;
  line-height: 1;
}

.portrait-placeholder p {
  font-size: 0.9rem;
}


.portrait-frame {
  overflow: hidden;
}

.portrait-image {
  display: block;
  width: 100%;
  height: 100%;

  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 25%;

  border-radius: 22px;
}

.floating-label {
  position: absolute;
  bottom: 20px;
  left: -22px;

  padding: 10px 16px;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 700;

  box-shadow: var(--shadow);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;

  background: #41d5aa;
  border-radius: 50%;
}


/* =========================================
   07. SECTION HEADINGS
   ========================================= */

.section-heading {
  max-width: 700px;
  margin-bottom: 35px;
}

.section-heading h2 {
  margin: 0 0 16px;

  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.055em;
}

.section-heading > p:last-child,
.about-intro p {
  color: var(--muted);
}


/* =========================================
   08. ABOUT ME
   ========================================= */

.about-intro {
  max-width: 850px;
  margin-bottom: 35px;
}

.about-intro p {
  margin: 0 0 15px;
}

.interest-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}


/* =========================================
   09. SHARED CARD STYLES
   ========================================= */

.card {
  padding: 25px;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;

  transition:
    border-color 0.25s,
    transform 0.25s,
    box-shadow 0.25s;
}

.card:hover {
  border-color: color-mix(
    in srgb,
    var(--accent) 65%,
    var(--border)
  );

  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 14px 0 10px;
  font-size: 1.13rem;
  line-height: 1.35;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-icon {
  width: 45px;
  height: 45px;
  flex: 0 0 45px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  background: color-mix(
    in srgb,
    var(--accent) 15%,
    var(--surface)
  );

  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 800;
}


/* =========================================
   10. SKILLS & TOOLS
   HORIZONTAL CARD LAYOUT
   ========================================= */

.skills-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skill-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.skill-content {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  gap: 28px;
  align-items: start;
}

.skill-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.skill-resources {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.resource-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}

.mini-heading {
  color: var(--muted) !important;
  font-size: 0.7rem !important;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.tags,
.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.tags span,
.tool-tags span {
  padding: 5px 9px;
  border-radius: 7px;

  background: color-mix(
    in srgb,
    var(--accent) 13%,
    var(--surface)
  );

  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.5;
}

.tool-tags span {
  background: transparent;
  border: 1px solid var(--border);
}


/* =========================================
   11. FEATURED PROJECTS
   ========================================= */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.card.featured-project {
  max-width: 960px;
  margin: auto;
  padding: 0;
  overflow: hidden;
}

.project-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f97bb2;
  border-bottom: 1px solid var(--border);
}

.project-preview iframe {
  display: block;
  /* Crop the embedded page's scrollbar; exploration opens in a new tab. */
  width: calc(200% + 32px);
  height: 200%;
  border: 0;
  transform: scale(0.5);
  transform-origin: top left;
  pointer-events: none;
}

.project-preview-link {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(transparent 65%, rgb(0 0 0 / 65%));
}

.project-preview-link span {
  padding: 10px 16px;
  border-radius: 999px;
  background: #151c30;
  color: #fff;
  font-size: 0.875rem;
  text-align: center;
}

.project-preview-link:focus-visible {
  outline: 3px solid var(--highlight);
  outline-offset: -5px;
}

.project-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px clamp(24px, 4vw, 40px);
  padding: clamp(20px, 4vw, 36px);
}

.project-details > * {
  grid-column: 1;
}

.project-details > .project-logo {
  grid-column: 2;
  grid-row: 1 / 5;
  align-self: center;
}

.project-details .eyebrow {
  color: var(--accent);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.project-details h3 {
  margin: -8px 0 0;
  font-size: 1.75rem;
}

.project-description {
  min-width: 0;
}

.project-description p {
  max-width: 72ch;
  min-width: 0;
  line-height: 1.8;
}

.project-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(140px, 18vw, 192px);
  height: clamp(140px, 18vw, 192px);
  border-radius: 24px;
  background: #fff;
}

.project-logo img {
  display: block;
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.project-logo .project-logo-light {
  display: none;
}

:root[data-theme="light"] .project-logo {
  background: #000;
}

:root[data-theme="light"] .project-logo-dark {
  display: none;
}

:root[data-theme="light"] .project-logo-light {
  display: block;
}

@media (max-width: 600px) {
  .project-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-details > .project-logo {
    grid-column: 1;
    grid-row: auto;
  }

  .project-logo {
    width: 140px;
    height: 140px;
  }
}

.project-details > p:not(.eyebrow) {
  max-width: 72ch;
  line-height: 1.8;
}

.project-details .tags {
  margin: 0;
  gap: 8px;
}

.project-details .project-credit {
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
}

.project-details > .project-testimonial {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.project-testimonial h4 {
  margin: 0 0 18px;
  font-size: 1rem;
  color: var(--accent);
}

.project-testimonial figure,
.project-testimonial blockquote {
  margin: 0;
}

.project-testimonial blockquote p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: var(--text);
}

.project-testimonial figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}

.testimonial-ratings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.testimonial-ratings > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.testimonial-ratings dt {
  font-size: 0.875rem;
  color: var(--muted);
}

.testimonial-ratings dd {
  margin: auto 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

.project-testimonial .testimonial-note {
  margin-top: 10px;
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .testimonial-ratings {
    grid-template-columns: minmax(0, 1fr);
  }
}

.training-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.training-summary h3 {
  margin: 0;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.card.credential-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.credential-card > a {
  display: block;
  background: #fff;
}

.credential-card img {
  display: block;
  width: 100%;
  height: auto;
}

.credential-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 24px;
  flex: 1;
}

.credential-details h3 {
  margin: 0 0 8px;
}

.credential-details .button {
  margin-top: auto;
}

@media (max-width: 700px) {
  .credentials-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.empty-projects {
  max-width: 850px;
  margin: auto;
  padding: 70px 25px;
  text-align: center;
}

.empty-projects h3 {
  font-size: 1.5rem;
}

.empty-projects p {
  max-width: 540px;
  margin: auto;
}

.empty-icon {
  width: 75px;
  height: 75px;

  display: grid;
  place-items: center;
  margin: auto;

  border-radius: 20px;

  background: color-mix(
    in srgb,
    var(--accent) 15%,
    var(--surface)
  );

  color: var(--accent);
  font-size: 3rem;
}

.empty-caption {
  margin-top: 25px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}


/* =========================================
   12. CONTACT
   ========================================= */

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;

  min-width: 0;
  cursor: pointer;
}

.contact-card h3 {
  margin: 0 0 6px;
}

.contact-card > div {
  min-width: 0;
}

.contact-icon {
  width: 45px;
  height: 45px;
  flex: 0 0 45px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  background: color-mix(
    in srgb,
    var(--accent) 15%,
    var(--surface)
  );

  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 800;
}

.contact-link {
  display: inline-block;
  margin-top: 12px;

  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;

  overflow-wrap: anywhere;
  transition: color 0.2s;
}

.contact-card:hover .contact-link,
.contact-card:focus-visible .contact-link {
  color: var(--highlight);
}


/* =========================================
   13. FOOTER
   ========================================= */

.site-footer {
  border-top: 1px solid var(--border);
  overflow: clip;
}

.footer-content {
  min-height: 85px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  color: var(--muted);
  font-size: 0.85rem;
}


/* =========================================
   14. SCROLL REVEAL ANIMATION
   ========================================= */

.reveal {
  opacity: 0;
  transform: translateY(18px);

  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

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

/* Section backgrounds stay fixed; only their content can scroll-reveal. */
main > section,
.site-header,
.site-footer {
  opacity: 1;
  transform: none;
}

#contact {
  overflow: clip;
}


/* =========================================
   15. RESPONSIVE — TABLET
   ========================================= */

@media (max-width: 900px) {

  .hero {
    gap: 35px;
  }

  .interest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .nav-actions,
  .nav-links {
    gap: 16px;
  }

  .skill-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .skill-resources {
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }
}


/* =========================================
   16. RESPONSIVE — MOBILE
   ========================================= */

@media (max-width: 700px) {

  .container {
    width: min(100% - 32px, 1120px);
  }

  .section {
    padding: 75px 0;
  }

  /* Hero */

  .hero {
    grid-template-columns: 1fr;
    gap: 35px;
    padding-block: 65px;
  }

  .hero-visual {
    max-width: 310px;
    grid-row: 1;
  }

  .hero-copy {
    grid-row: 2;
  }

  .hero h1 {
  font-size: clamp(1.6rem, 6vw, 2.5rem);
  white-space: normal;
}


  .floating-label {
    left: 0;
  }

  /* About */

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

  /* Navigation */

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    display: none;

    position: absolute;
    top: 76px;
    left: 0;
    right: 0;

    padding: 18px 20px;

    background: var(--bg);
    border-bottom: 1px solid var(--border);

    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 8px;
  }

  /* Skills */

  .skill-card {
    padding: 22px;
  }

  .skill-header h3 {
    font-size: 1.1rem;
  }

  .skill-content {
    grid-template-columns: 1fr;
  }

  .skill-resources {
    gap: 16px;
  }

  /* Shared cards */

  .card {
    padding: 22px;
  }

  .empty-projects {
    padding: 55px 22px;
  }

  /* Footer */

  .footer-content {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}


/* =========================================
   17. ACCESSIBILITY — REDUCED MOTION
   ========================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

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