/* ==========================================================================
   Portfolio2 — design language mirrored from segun-adeniyi.vercel.app
   Tokens first; everything below uses them.
   ========================================================================== */
:root {
  --bg: #13111d;                 /* page background (tailwind "primary") */
  --text: #e5e7eb;               /* body text ("secondary", gray-200) */
  --muted: #9ca3af;              /* gray-400 */
  --white: #ffffff;
  --green: #42946e;              /* "leMon" — buttons, menu sheet, rail */
  --purple: #853bce;             /* "rouge" — numbers, inputs, odd card bottom */
  --cyan: #06b6d4;               /* cyan-500 — hero accent, even card top */
  --orange: #fb923c;             /* orange-400 — even card bottom */
  --green-400: #4ade80;          /* odd card top */
  --border: #d1d5db;             /* gray-300 card border */
  --ink: #13111d;                /* icon colour on cards */

  --font-body: "Outfit", Helvetica, Arial, sans-serif;
  --font-display: "Oxanium", "Outfit", sans-serif;
  --font-script: "Dancing Script", cursive;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 4px;   /* inputs, submit */
  --radius-md: 6px;   /* hero button */
  --radius-xl: 12px;  /* top bar */
  --radius-3xl: 24px; /* project cards, mock tops */

  --shadow-card: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
  --glow-cyan: -2px 0 14px 5px rgba(106, 208, 200, 0.4);

  --wrap: 83.333%;    /* w-10/12 */
  --bar: 91.666%;     /* w-11/12 */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --menu-origin: 94% 7%;
}
@media (max-width: 500px) { :root { --menu-origin: 86.5% 6%; } }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; fill: currentColor; }

/* --------------------------------------------------------------------------
   Entrance curtain
   -------------------------------------------------------------------------- */
.entrance {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: grid; place-items: center;
  animation: curtain 1.1s var(--ease) 1.4s forwards;
}
.entrance-draw path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.2s ease-out forwards; }
.entrance-draw .d2 { animation-delay: .25s; }
.entrance-draw .d3 { animation-delay: .5s; }
.entrance-draw .d4 { animation-delay: .7s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes curtain { to { transform: translateY(-100%); visibility: hidden; } }
.no-motion .entrance { display: none; }

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
.topbar {
  position: fixed; top: 1rem; left: 0; right: 0; z-index: 1400;
  width: var(--bar); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: .25rem .5rem; border-radius: var(--radius-xl);
  opacity: 0; animation: fade 1s ease 2.6s forwards;
}
@media (min-width: 768px) { .topbar { top: .25rem; padding: 1rem .5rem; } }
@keyframes fade { to { opacity: 1; } }
.no-motion .topbar { animation: none; opacity: 1; }

.logo {
  font-family: var(--font-script); font-weight: 700; font-size: 1.25rem;
  color: var(--text);
  transition: opacity 1s, transform 1s;
  transform: translate(1rem, -0.25rem);
}
@media (min-width: 768px) { .logo { transform: translate(3rem, -0.25rem); } }
.topbar.hide .logo { opacity: 0; }
.topbar.menu-open .logo { color: var(--text); }

.burger {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: opacity 1s, transform 1s, background .5s;
  transform: translateY(-.5rem);
}
.topbar.hide .burger { opacity: 0; transform: translate(-3.5rem, -.5rem); }
.topbar.menu-open .burger { opacity: 1; transform: translateY(-.5rem); background: transparent; }
.burger .bar { display: block; height: 2px; background: var(--text); border-radius: 1px; transition: transform .5s, opacity .5s; }
.burger .b1, .burger .b3 { width: 20px; }
.burger .b2 { width: 28px; }
.topbar.menu-open .b1 { transform: translateY(8px) rotate(45deg); }
.topbar.menu-open .b2 { transform: translateX(24rem); opacity: 0; }
.topbar.menu-open .b3 { transform: translateY(-8px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Full-screen menu (circular clip-path from the button)
   -------------------------------------------------------------------------- */
.menu-sheet {
  position: fixed; inset: 0; z-index: 1200;
  background: var(--green);
  clip-path: circle(0px at var(--menu-origin));
  transition: clip-path 1s var(--ease);
}
body.menu-open .menu-sheet { clip-path: circle(calc(100vh + 100vw) at var(--menu-origin)); transition-duration: 1.5s; }
.menu {
  position: fixed; top: 25%; left: 0; right: 0; z-index: 1300;
  width: var(--wrap); margin: 0 auto;
  display: flex; flex-direction: column; gap: 3rem;
  opacity: 0; transform: translateY(50px);
}
.menu[hidden] { display: none; }
body.menu-open .menu { opacity: 1; transform: none; transition: opacity .4s .8s, transform .4s .8s; }
@media (min-width: 768px) { .menu { flex-direction: row; } }
.menu-col { width: 100%; display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 768px) { .menu-col { width: 50%; } }
.menu-label { font-size: .875rem; letter-spacing: .3rem; text-transform: uppercase; font-weight: 600; color: var(--text); }
.menu-social { display: flex; gap: 1rem; align-items: center; }
.menu-social .ic { width: 30px; height: 30px; }
.menu-nav { display: flex; flex-direction: column; gap: 1rem; }
.menu-nav a {
  font-size: 2rem; text-transform: uppercase; color: var(--text);
  transition: letter-spacing .5s;
}
.menu-nav a:hover, .menu-nav a:focus-visible { letter-spacing: .3rem; }

/* --------------------------------------------------------------------------
   Social rail (desktop only)
   -------------------------------------------------------------------------- */
.socials {
  display: none; position: fixed; bottom: 0; left: .5rem; z-index: 900;
  width: 2rem; flex-direction: column; align-items: center;
}
@media (min-width: 768px) { .socials { display: flex; } }
.socials ul { display: flex; flex-direction: column; gap: 1rem; }
.socials li { opacity: 0; transform: translateY(100px); animation: rise .5s ease forwards; }
.socials li:nth-child(1) { animation-delay: 3s; }
.socials li:nth-child(2) { animation-delay: 3.2s; }
.socials li:nth-child(3) { animation-delay: 3.4s; }
.socials li:nth-child(4) { animation-delay: 3.5s; }
.socials li:nth-child(5) { animation-delay: 3.6s; }
.socials .ic { width: 25px; height: 25px; color: var(--green); transition: transform .3s, color .3s; }
.socials a:hover .ic { transform: translateY(-3px); color: var(--text); }
.rail { width: 4px; height: 0; margin-top: 1.25rem; background: var(--green); animation: grow-rail 1.4s cubic-bezier(.34, 1.56, .64, 1) 3.6s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes grow-rail { to { height: 10rem; } }
.no-motion .socials li, .no-motion .topbar { animation: none; opacity: 1; transform: none; }
.no-motion .rail { animation: none; height: 10rem; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.screens { position: relative; z-index: 9; background: var(--bg); }
.hero {
  width: var(--wrap); min-height: 100vh; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center;
  color: var(--white); scroll-snap-align: start;
}
@media (min-width: 768px) { .hero { flex-direction: row; } }
.hero-text { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: .5rem; }
@media (min-width: 768px) { .hero-text { width: 50%; gap: .75rem; } }
.hero-kicker {
  font-family: var(--font-display); font-weight: 400; color: var(--muted);
  font-size: 1.25rem; margin-bottom: 1rem;
  animation: reveal-up 1s var(--ease) 2.5s both;
}
@media (min-width: 768px) { .hero-kicker { font-size: 1.875rem; margin-bottom: .25rem; } }
.hero-name {
  font-family: var(--font-display); font-weight: 600; color: var(--white);
  font-size: 2rem; letter-spacing: .3rem; line-height: 1.1; margin-top: -1.25rem;
  animation: reveal-spring 1.1s cubic-bezier(.34, 1.4, .64, 1) 2.5s both;
}
@media (min-width: 768px) { .hero-name { font-size: 5rem; } }
@media (min-width: 768px) and (max-width: 1100px) { .hero-name { font-size: 3.5rem; } }
.hero-tag {
  font-family: var(--font-display); color: var(--text);
  font-size: 1.125rem; max-width: 36rem;
  animation: reveal-up 1s var(--ease) 2.5s both;
}
@media (min-width: 768px) { .hero-tag { font-size: 1.25rem; } }
.accent { color: var(--cyan); font-weight: 500; }

.btn-outline {
  position: relative; z-index: 10; isolation: isolate;
  display: inline-flex; justify-content: center; align-items: center;
  margin-top: 2rem; padding: .25rem 2rem;
  font-family: var(--font-display); font-size: 1.125rem; letter-spacing: .1em;
  color: var(--white); border: 2px solid var(--green); border-radius: var(--radius-md);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  overflow: hidden; transition: color .7s;
  animation: fade-up .5s ease 4.1s both;
}
@media (min-width: 768px) { .btn-outline { font-size: 1.25rem; } }
.btn-outline::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--green); transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.btn-outline:hover::before, .btn-outline:focus-visible::before { transform: scaleX(1); }

.hero-art { display: none; width: 50%; justify-content: center; align-items: center; animation: slide-in .6s cubic-bezier(.34, 1.4, .64, 1) 4.7s both; }
@media (min-width: 768px) { .hero-art { display: flex; } }
.laptop { width: min(100%, 520px); height: auto; }
.laptop .float { animation: bob 6s ease-in-out infinite; transform-origin: center; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@keyframes reveal-up { from { transform: translateY(50px); clip-path: polygon(0 0, 0 0, 0 0, 0 0); } to { transform: none; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } }
@keyframes reveal-spring { from { transform: translateY(200px); clip-path: polygon(0 0, 0 0, 0 0, 0 0); } to { transform: none; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(200px); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: none; } }
.no-motion .hero-kicker, .no-motion .hero-name, .no-motion .hero-tag, .no-motion .btn-outline, .no-motion .hero-art { animation: none; }
.no-motion .laptop .float { animation: none; }

/* --------------------------------------------------------------------------
   Sections and the sticky, shrinking header
   -------------------------------------------------------------------------- */
.section { width: 100%; margin: 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; color: var(--text); }
@media (min-width: 768px) { .section { gap: 1.5rem; } }
.about, .contact { min-height: 100vh; scroll-snap-align: start; }

.section-head {
  position: sticky; top: 0; z-index: 2000;
  width: 100%; margin: 4rem 0; padding: 1rem 1.5rem;
  display: flex; align-items: center;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(19, 17, 29, .35);
}
@media (min-width: 768px) { .section-head { padding: 1rem 5rem; } }
.section-head .num { color: var(--purple); font-size: 1rem; transition: transform 1s, color 1s, font-size 1s; }
.section-head .ttl { font-family: var(--font-display); font-weight: 700; font-size: 1rem; padding: .25rem .5rem 0; white-space: nowrap; transition: transform 1s, font-size 1s; }
body.scrolled-down .section-head .num { transform: translate(.75rem, .75rem); color: var(--white); font-size: .875rem; }
body.scrolled-down .section-head .ttl { transform: translate(.5rem, .75rem); font-size: .875rem; }
@media (min-width: 768px) {
  body.scrolled-down .section-head .num { transform: translate(1.75rem, .75rem); }
  body.scrolled-down .section-head .ttl { transform: translate(1.5rem, .75rem); }
}

/* About */
.about-body { width: var(--wrap); margin: 0 auto; padding: 2rem 0; }
.lead { font-size: 1.25rem; max-width: 42rem; }
.skills { display: flex; flex-wrap: wrap; width: 100%; margin-top: 3rem; }
@media (min-width: 768px) { .skills { width: 66%; } }
.skills li { display: flex; align-items: center; gap: .5rem; padding: .75rem 0; margin-left: 1.5rem; color: var(--text); }
.skills .ic { width: 1rem; height: 1rem; color: var(--green); }

/* --------------------------------------------------------------------------
   Project cards: alternating vertical gradients, 24px radius, 1px border
   -------------------------------------------------------------------------- */
.cards { width: 100%; padding: 0 1rem; }
@media (min-width: 768px) { .cards { padding: 0 3.5rem; } }
.card {
  width: 100%; margin: 0 auto 2rem;
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--border); border-radius: var(--radius-3xl);
  background-image: linear-gradient(to top, var(--purple), var(--green-400));
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card:nth-child(even) { background-image: linear-gradient(to top, var(--orange), var(--cyan)); }
@media (min-width: 768px) { .card { flex-direction: row; height: 35rem; } .card:nth-child(even) { flex-direction: row-reverse; } }
@media (min-width: 1280px) { .card { width: 60rem; } }
.card-text { width: 100%; padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 768px) { .card-text { width: 50%; padding: 2rem; gap: 2rem; } }
.card h3 { font-size: 1.875rem; font-weight: 700; line-height: 1.2; color: var(--text); }
.card p { font-weight: 400; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 0 1rem; width: 100%; }
.chips li { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; font-size: .75rem; color: var(--ink); }
@media (min-width: 768px) { .chips li { font-size: .875rem; } }
.chips .ic { width: 1rem; height: 1rem; color: var(--ink); }
@media (min-width: 768px) { .chips .ic { width: 1.5rem; height: 1.5rem; } }
.links { display: flex; justify-content: flex-end; gap: 1rem; font-weight: 700; }
@media (min-width: 768px) { .links { justify-content: flex-start; } }
.links a { display: flex; align-items: center; gap: .25rem; }
.links .ic { width: 30px; height: 30px; color: var(--ink); }
.links span { color: var(--text); transition: letter-spacing .5s; }
.links a:hover span, .links a:focus-visible span { letter-spacing: .3rem; }

.card-shot { width: 100%; display: flex; align-items: flex-end; padding: 0 1rem; }
@media (min-width: 768px) { .card-shot { width: 50%; padding: 0 2rem; } }
.mock {
  width: 100%; background: var(--bg); color: var(--text);
  border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
  border: 1px solid rgba(255,255,255,.12); border-bottom: 0;
  box-shadow: 0 -1px 21px 9px rgba(120, 83, 49, .25);
  font-family: var(--font-mono); font-size: .78rem; line-height: 1.6;
  overflow: hidden;
}
@media (min-width: 768px) { .mock { font-size: .74rem; } }
@media (min-width: 1280px) { .mock { font-size: .82rem; } }
.mock-bar { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3f3b52; }
.mock-bar i:nth-child(1) { background: #ff5f57; } .mock-bar i:nth-child(2) { background: #febc2e; } .mock-bar i:nth-child(3) { background: #28c840; }
.mock-bar b { margin-left: .5rem; font-weight: 500; color: var(--muted); font-family: var(--font-body); font-size: .8rem; }
.mock pre { padding: .9rem 1rem 1.2rem; white-space: pre; overflow: hidden; color: var(--text); }
.reveal-shot { transform: translateY(100%); clip-path: polygon(0 0, 0 0, 0 0, 0 0); transition: transform 1s var(--ease), clip-path 1s var(--ease); }
.reveal-shot.in { transform: none; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

/* --------------------------------------------------------------------------
   Experience timeline
   -------------------------------------------------------------------------- */
.exp-intro { width: var(--wrap); margin: 0 auto; font-size: 1.125rem; color: var(--muted); }
.exp-intro { max-width: 42rem; margin-left: 8.333%; }
.timeline { width: var(--wrap); margin: 1rem auto 4rem; }
.month { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--white); margin: 2.5rem 0 1rem; letter-spacing: .05em; }
.tl { border-left: 2px solid var(--green); padding-left: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.tl li { position: relative; display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; }
@media (max-width: 500px) { .tl li { grid-template-columns: 1fr; gap: .25rem; } }
.tl li::before { content: ""; position: absolute; left: calc(-1.5rem - 7px); top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 4px var(--bg); }
.tl time { font-family: var(--font-display); color: var(--muted); font-size: .95rem; padding-top: .1rem; white-space: nowrap; }
.tl strong { display: block; color: var(--white); font-weight: 700; margin-bottom: .15rem; }
.tl div { color: var(--text); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact { width: var(--wrap); }
.contact .section-head { padding-left: 0; padding-right: 0; }
.contact-form { width: 100%; margin-top: 3rem; padding-bottom: 10rem; display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 768px) { .contact-form { width: 50%; } }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field input, .field textarea {
  font: inherit; color: var(--text); background: transparent;
  border: 1px solid var(--purple); border-radius: var(--radius-sm); padding: .5rem; outline: none;
  transition: box-shadow .3s;
}
.field input:focus, .field textarea:focus { box-shadow: 0 0 0 3px rgba(133, 59, 206, .35); }
.field textarea { resize: vertical; min-height: 6rem; }
.btn-submit {
  width: 100%; height: 3rem; margin-top: 1.5rem;
  border: 1px solid var(--green); border-radius: var(--radius-sm); color: var(--green);
  box-shadow: var(--glow-cyan);
  transition: color .5s, letter-spacing .5s;
}
@media (min-width: 768px) { .btn-submit { width: 33%; } }
.btn-submit:hover, .btn-submit:focus-visible { color: var(--white); letter-spacing: .3rem; }
.form-note { color: var(--muted); font-size: .9rem; }

.footer { width: var(--wrap); margin: 0 auto; padding: 2rem 0 3rem; color: var(--muted); font-size: .9rem; text-align: center; }

/* --------------------------------------------------------------------------
   Scroll reveal (IntersectionObserver adds .in)
   -------------------------------------------------------------------------- */
/* .reveal keeps a non-zero box (no clip-path) so IntersectionObserver can see it */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-group > li { opacity: 0; transform: translateY(10px); clip-path: polygon(0 0, 0 0, 0 0, 0 0); transition: opacity .2s var(--ease), transform .2s var(--ease), clip-path .2s var(--ease); transition-delay: calc(var(--i, 0) * 100ms); }
.reveal-group.in > li { opacity: 1; transform: none; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
  .reveal, .reveal-group > li, .reveal-shot { opacity: 1; transform: none; clip-path: none; }
}
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
