/* ============================================================
   CoDesign Portfolio — Main Stylesheet
   styles.css
   ============================================================
   Table of Contents
   ----------------------------------------------------------
   1.  Google Fonts Import
   2.  CSS Custom Properties (Design Tokens)
   3.  Reset & Base
   4.  Header & Desktop Nav
   5.  Hamburger Button
   6.  Mobile Menu Overlay
   7.  Hero Section
   8.  Buttons
   9.  Section Commons
   10. About Section
   11. Skill Cards
   12. Work Section
   13. Project Cards
   14. Footer / Contact
   15. Responsive — Tablet  (≤ 860px)
   16. Responsive — Mobile  (≤ 480px)
   17. Responsive — Extra-small (≤ 360px)
   ============================================================ */


/* ── 1. GOOGLE FONTS ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');


/* ── 2. CSS CUSTOM PROPERTIES ─────────────────────────────── */
:root {
  --accent:    #E9832E;
  --bg:        #0a0a0a;
  --bg-card:   #111111;
  --bg-card2:  #161616;
  --text:      #f0ede8;
  --muted:     #888;
  --border:    #222;
  --header-h:  64px;
}


/* ── 3. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background:   var(--bg);
  color:        var(--text);
  font-family:  'DM Sans', sans-serif;
  font-weight:  300;
  font-size:    16px;
  line-height:  1.7;
  overflow-x:   hidden;
}


/* ── 4. HEADER & DESKTOP NAV ──────────────────────────────── */
header {
  position:         fixed;
  top: 0; left: 0; right: 0;
  z-index:          200;
  height:           var(--header-h);
  display:          flex;
  justify-content:  space-between;
  align-items:      center;
  padding:          0 6vw;
  background:       rgba(10, 10, 10, 0.92);
  backdrop-filter:  blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom:    1px solid var(--border);
}

.logo {
  font-family:     'Bebas Neue', sans-serif;
  font-size:       1.8rem;
  letter-spacing:  0.08em;
  color:           var(--accent);
  text-decoration: none;
  z-index:         210;
  position:        relative;
}

nav {
  display: flex;
  gap:     2.4rem;
}

nav a {
  text-decoration: none;
  color:           var(--muted);
  font-size:       0.85rem;
  letter-spacing:  0.12em;
  text-transform:  uppercase;
  transition:      color 0.25s;
  position:        relative;
}

nav a::after {
  content:    '';
  position:   absolute;
  bottom: -4px; left: 0;
  width:      0;
  height:     1px;
  background: var(--accent);
  transition: width 0.3s;
}

nav a:hover            { color: var(--text); }
nav a:hover::after     { width: 100%; }


/* ── 5. HAMBURGER BUTTON ──────────────────────────────────── */
.hamburger {
  display:         none;        /* shown only at ≤ 480px */
  flex-direction:  column;
  justify-content: center;
  gap:             5px;
  width:           40px;
  height:          40px;
  background:      none;
  border:          none;
  cursor:          pointer;
  padding:         6px;
  z-index:         210;
  position:        relative;
}

.hamburger span {
  display:          block;
  width:            100%;
  height:           1.5px;
  background:       var(--text);
  border-radius:    2px;
  transition:       transform 0.35s ease, opacity 0.25s ease, background 0.25s;
  transform-origin: center;
}

/* Animated X when open */
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg);  background: var(--accent); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--accent); }


/* ── 6. MOBILE MENU OVERLAY ───────────────────────────────── */
.mobile-menu {
  display:         none;        /* shown only at ≤ 480px */
  position:        fixed;
  inset:           0;
  z-index:         190;
  background:      rgba(10, 10, 10, 0.98);
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  gap:             2.4rem;
  opacity:         0;
  pointer-events:  none;
  transition:      opacity 0.35s ease;
}

.mobile-menu.open {
  opacity:        1;
  pointer-events: all;
}

.mobile-menu a {
  font-family:     'Bebas Neue', sans-serif;
  font-size:       3rem;
  letter-spacing:  0.08em;
  color:           var(--text);
  text-decoration: none;
  transition:      color 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a:active { color: var(--accent); }

.mobile-menu-footer {
  position:       absolute;
  bottom:         3rem;
  font-size:      0.7rem;
  letter-spacing: 0.2em;
  color:          var(--muted);
  text-transform: uppercase;
}


/* ── 7. HERO SECTION ──────────────────────────────────────── */
#hero {
  min-height:      100svh;
  display:         flex;
  flex-direction:  column;
  justify-content: flex-end;
  padding:         calc(var(--header-h) + 2rem) 6vw 8vh;
  position:        relative;
  overflow:        hidden;
}

.hero-grid-bg {
  position:         absolute;
  inset:            0;
  background-image:
    linear-gradient(rgba(233, 131, 46, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 131, 46, 0.04) 1px, transparent 1px);
  background-size:  60px 60px;
  animation:        gridFade 3s ease forwards;
}

@keyframes gridFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-orb {
  position:      absolute;
  top: 15%; right: -5%;
  width:         420px;
  height:        420px;
  border-radius: 50%;
  background:    radial-gradient(circle, rgba(233, 131, 46, 0.18) 0%, transparent 70%);
  filter:        blur(40px);
  animation:     breathe 6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1);   opacity: 0.7; }
  50%       { transform: scale(1.1); opacity: 1;   }
}

.hero-label {
  font-size:      0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color:          var(--accent);
  margin-bottom:  1.2rem;
  opacity:        0;
  animation:      riseIn 0.8s 0.3s ease forwards;
}

.hero-headline {
  font-family:    'Bebas Neue', sans-serif;
  font-size:      clamp(3rem, 11vw, 8rem);
  line-height:    0.95;
  letter-spacing: 0.01em;
  max-width:      900px;
  opacity:        0;
  animation:      riseIn 0.9s 0.5s ease forwards;
}

.hero-headline em {
  font-style: normal;
  color:      var(--accent);
}

.hero-bio {
  margin-top: 2rem;
  max-width:  480px;
  color:      var(--muted);
  font-size:  0.95rem;
  line-height: 1.8;
  opacity:    0;
  animation:  riseIn 0.9s 0.75s ease forwards;
}

.hero-cta {
  margin-top:  2.4rem;
  display:     flex;
  flex-wrap:   wrap;
  gap:         1rem;
  align-items: center;
  opacity:     0;
  animation:   riseIn 0.9s 1s ease forwards;
}

.hero-scroll {
  position:       absolute;
  bottom: 2.5rem; right: 6vw;
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            8px;
  color:          var(--muted);
  font-size:      0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity:        0;
  animation:      riseIn 1s 1.4s ease forwards;
}

.hero-scroll::after {
  content:    '';
  width:      1px;
  height:     50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation:  scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1);   opacity: 1;   }
  50%       { transform: scaleY(0.5); opacity: 0.4; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0);    }
}


/* ── 8. BUTTONS ───────────────────────────────────────────── */
.btn-primary {
  display:         inline-block;
  background:      var(--accent);
  color:           #0a0a0a;
  text-decoration: none;
  font-size:       0.82rem;
  font-weight:     500;
  letter-spacing:  0.14em;
  text-transform:  uppercase;
  padding:         14px 28px;
  transition:      background 0.25s, transform 0.2s;
  white-space:     nowrap;
}

.btn-primary:hover {
  background: #f0952e;
  transform:  translateY(-2px);
}

.btn-ghost {
  display:         inline-block;
  border:          1px solid var(--border);
  color:           var(--muted);
  text-decoration: none;
  font-size:       0.82rem;
  letter-spacing:  0.14em;
  text-transform:  uppercase;
  padding:         14px 28px;
  transition:      border-color 0.25s, color 0.25s, transform 0.2s;
  white-space:     nowrap;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color:        var(--text);
  transform:    translateY(-2px);
}


/* ── 9. SECTION COMMONS ───────────────────────────────────── */
section { padding: 90px 6vw; }

.section-tag {
  font-size:      0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color:          var(--accent);
  margin-bottom:  0.9rem;
}

.section-title {
  font-family:    'Bebas Neue', sans-serif;
  font-size:      clamp(2.2rem, 6vw, 4rem);
  line-height:    1;
  letter-spacing: 0.02em;
}

.divider {
  width:      40px;
  height:     2px;
  background: var(--accent);
  margin:     1.4rem 0 2.4rem;
}


/* ── 10. ABOUT SECTION ────────────────────────────────────── */
#about {
  border-top:            1px solid var(--border);
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   80px;
  align-items:           start;
}

.about-intro p {
  color:       var(--muted);
  font-size:   0.95rem;
  line-height: 1.9;
}

.about-intro p + p { margin-top: 1.1rem; }


/* ── 11. SKILL CARDS ──────────────────────────────────────── */
.skills-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   1.1rem;
}

.skill-card {
  background:  var(--bg-card);
  border:      1px solid var(--border);
  padding:     24px 28px;
  position:    relative;
  overflow:    hidden;
  transition:  border-color 0.3s, transform 0.3s;
  cursor:      default;
}

.skill-card::before {
  content:          '';
  position:         absolute;
  top: 0; left: 0;
  width:            3px;
  height:           100%;
  background:       var(--accent);
  transform:        scaleY(0);
  transform-origin: bottom;
  transition:       transform 0.35s ease;
}

.skill-card:hover          { border-color: #333; transform: translateX(6px); }
.skill-card:hover::before  { transform: scaleY(1); }

.skill-num {
  font-family:    'Bebas Neue', sans-serif;
  font-size:      0.85rem;
  color:          var(--accent);
  letter-spacing: 0.1em;
  margin-bottom:  6px;
}

.skill-name {
  font-family:    'Bebas Neue', sans-serif;
  font-size:      1.4rem;
  letter-spacing: 0.05em;
  margin-bottom:  6px;
}

.skill-desc {
  color:       var(--muted);
  font-size:   0.87rem;
  line-height: 1.7;
}


/* ── 12. WORK SECTION ─────────────────────────────────────── */
#work { border-top: 1px solid var(--border); }

.work-header {
  display:         flex;
  justify-content: space-between;
  align-items:     flex-end;
  margin-bottom:   3rem;
  flex-wrap:       wrap;
  gap:             1.2rem;
}

.projects-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   2px;
}


/* ── 13. PROJECT CARDS ────────────────────────────────────── */
.project-card {
  background: var(--bg-card);
  border:     1px solid var(--border);
  overflow:   hidden;
}

.project-thumb {
  width:           100%;
  aspect-ratio:    16 / 10;
  background:      var(--bg-card2);
  position:        relative;
  overflow:        hidden;
  display:         flex;
  align-items:     center;
  justify-content: center;
}

.project-thumb-pattern {
  position: absolute;
  inset:    0;
  opacity:  0.5;
}

.project-thumb svg {
  position: relative;
  z-index:  1;
  opacity:  0.2;
}

.company-logo {
  position:        relative;
  z-index:         1;
  max-width:       60%;
  max-height:      55%;
  object-fit:      contain;
  mix-blend-mode:  screen;
}

.project-thumb-p1 {
  background: repeating-linear-gradient(
    45deg,
    rgba(233, 131, 46, 0.08) 0px,
    rgba(233, 131, 46, 0.08) 1px,
    transparent 1px,
    transparent 18px
  );
}

.project-thumb-p2 {
  background: repeating-linear-gradient(
    -30deg,
    rgba(233, 131, 46, 0.07) 0px,
    rgba(233, 131, 46, 0.07) 1px,
    transparent 1px,
    transparent 22px
  );
}

.project-hover-overlay {
  display:         flex;
  align-items:     center;
  justify-content: center;
  background:      rgba(233, 131, 46, 0.08);
  border-top:      1px solid rgba(233, 131, 46, 0.2);
  padding:         10px 22px;
  max-height:      0;
  overflow:        hidden;
  opacity:         0;
  transition:      max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
}

.project-card:hover .project-hover-overlay {
  max-height: 60px;
  opacity:    1;
}

.overlay-text {
  font-family:    'Bebas Neue', sans-serif;
  font-size:      1rem;
  letter-spacing: 0.2em;
  color:          var(--accent);
  border:         1px solid var(--accent);
  padding:        10px 20px;
}

.project-info {
  padding:         20px 22px 8px;
  display:         flex;
  justify-content: space-between;
  align-items:     flex-start;
  flex-wrap:       wrap;
  gap:             0.5rem;
}

.project-name {
  font-family:    'Bebas Neue', sans-serif;
  font-size:      1.3rem;
  letter-spacing: 0.04em;
}

.project-tags {
  display:   flex;
  gap:       6px;
  flex-wrap: wrap;
}

.tag {
  font-size:      0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          var(--accent);
  border:         1px solid rgba(233, 131, 46, 0.3);
  padding:        3px 8px;
}

.project-desc {
  padding:     0 22px 20px;
  color:       var(--muted);
  font-size:   0.87rem;
  line-height: 1.7;
}

/* Job role subtitle inside experience cards */
.project-role {
  padding:        0 22px 10px;
  color:          var(--accent);
  font-size:      0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Bullet list of achievements inside experience cards */
.project-bullets {
  padding:     0 22px 24px 38px;
  display:     flex;
  flex-direction: column;
  gap:         0.55rem;
  list-style:  disc;
}

.project-bullets li {
  color:       var(--muted);
  font-size:   0.87rem;
  line-height: 1.65;
}

.project-bullets li::marker { color: var(--accent); }


/* ── 14. FOOTER / CONTACT ─────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding:    90px 6vw 50px;
}

.footer-inner {
  display:         flex;
  justify-content: space-between;
  align-items:     flex-end;
  flex-wrap:       wrap;
  gap:             3rem;
}

.footer-email {
  display:         inline-block;
  font-family:     'Bebas Neue', sans-serif;
  font-size:       1.2rem;
  letter-spacing:  0.1em;
  color:           var(--accent);
  text-decoration: none;
  border-bottom:   1px solid rgba(233, 131, 46, 0.4);
  padding-bottom:  4px;
  transition:      border-color 0.25s;
  margin-top:      1.8rem;
  word-break:      break-all;
}

.footer-email:hover { border-color: var(--accent); }

.footer-linkedin {
  display:         block;
  font-size:       0.8rem;
  letter-spacing:  0.1em;
  text-transform:  uppercase;
  color:           var(--muted);
  text-decoration: none;
  margin-top:      1rem;
  transition:      color 0.25s;
}

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

.footer-right { text-align: right; }

.footer-logo {
  font-family:    'Bebas Neue', sans-serif;
  font-size:      3rem;
  letter-spacing: 0.08em;
  color:          var(--accent);
  line-height:    1;
}

.footer-avail {
  color:          var(--muted);
  font-size:      0.82rem;
  margin-top:     0.8rem;
  letter-spacing: 0.05em;
}

.footer-bottom {
  margin-top:      4rem;
  padding-top:     2rem;
  border-top:      1px solid var(--border);
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  flex-wrap:       wrap;
  gap:             1rem;
}

.footer-bottom p {
  color:          var(--muted);
  font-size:      0.76rem;
  letter-spacing: 0.06em;
}

.footer-links {
  display:   flex;
  gap:       1.8rem;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color:           var(--muted);
  font-size:       0.76rem;
  letter-spacing:  0.1em;
  text-transform:  uppercase;
  transition:      color 0.25s;
}

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


/* ── 15. RESPONSIVE — TABLET  ≤ 860px ────────────────────── */
@media (max-width: 860px) {
  #about                 { grid-template-columns: 1fr; gap: 48px; }
  .skills-grid           { grid-template-columns: 1fr; }
  .projects-grid         { grid-template-columns: 1fr; }
  .work-header           { flex-direction: column; align-items: flex-start; }
  .footer-inner          { flex-direction: column; align-items: flex-start; }
  .footer-right          { text-align: left; }
}


/* ── 16. RESPONSIVE — MOBILE  ≤ 480px ────────────────────── */
@media (max-width: 480px) {
  :root { --header-h: 58px; }

  /* Header */
  header { padding: 0 5vw; }
  .logo  { font-size: 1.5rem; }

  /* Swap desktop nav for hamburger */
  .hamburger   { display: flex; }
  nav          { display: none; }
  .mobile-menu { display: flex; }

  /* Sections */
  section { padding: 68px 5vw; }
  footer  { padding: 68px 5vw 44px; }

  /* Hero */
  #hero {
    padding:    calc(var(--header-h) + 1.8rem) 5vw 10vh;
    min-height: 100svh;
  }

  .hero-orb      { width: 200px; height: 200px; top: 10%; right: -8%; }
  .hero-label    { font-size: 0.62rem; letter-spacing: 0.15em; margin-bottom: 1rem; }
  .hero-headline { font-size: clamp(2.8rem, 13.5vw, 4rem); line-height: 0.92; }
  .hero-bio      { font-size: 0.9rem; margin-top: 1.5rem; }
  .hero-scroll   { display: none; }

  .hero-cta {
    flex-direction: column;
    align-items:    stretch;
    gap:            0.8rem;
    margin-top:     2rem;
  }

  .btn-primary,
  .btn-ghost {
    text-align:  center;
    padding:     15px 20px;
    width:       100%;
    white-space: normal;
  }

  /* About */
  .section-title { font-size: clamp(2rem, 12vw, 3rem); }
  .skill-card    { padding: 20px 20px; }
  .skill-name    { font-size: 1.25rem; }

  /* Work */
  .work-header .btn-ghost { width: 100%; text-align: center; }
  .project-info           { flex-direction: column; gap: 0.5rem; padding: 18px 18px 8px; }
  .project-desc           { padding: 0 18px 18px; }
  .project-role           { padding: 0 18px 8px; }
  .project-bullets        { padding: 0 18px 20px 32px; }

  /* Footer */
  .footer-inner  { gap: 2rem; }
  .footer-logo   { font-size: 2.4rem; }
  .footer-right  { text-align: left; }

  .footer-bottom {
    flex-direction: column;
    align-items:    flex-start;
    gap:            1.2rem;
    margin-top:     3rem;
  }

  .footer-links  { gap: 1.2rem; }
}


/* ── 17. RESPONSIVE — EXTRA-SMALL  ≤ 360px ───────────────── */
@media (max-width: 360px) {
  .hero-headline { font-size: 2.55rem; }
  .footer-links  { flex-direction: column; gap: 0.7rem; }
}
