/* style.css - separated stylesheet */

/* ====== Theme variables ====== */
:root{
  --bg:#071025; --card:#091226; --muted:#9fb4c9; --text:#eaf4ff;
  --accent-grad: linear-gradient(90deg,#7dd3fc,#60a5fa);
  --glass: rgba(255,255,255,0.03);
  --radius:12px; --max-w:1100px; --ff-sans:Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  --gap:18px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; font-family:var(--ff-sans); background:radial-gradient(1200px 600px at 10% 10%, rgba(96,165,250,0.05), transparent), var(--bg);
  color:var(--text); -webkit-font-smoothing:antialiased;
}
a{color:inherit}

/* Container */
.site{max-width:var(--max-w); margin:22px auto; padding:20px}

/* Header */
header{position:sticky; top:12px; z-index:60; background:linear-gradient(180deg, rgba(7,16,37,0.6), rgba(7,16,37,0.45)); backdrop-filter: blur(6px);
 border-radius:10px; padding:10px; border:1px solid rgba(255,255,255,0.03); transition:box-shadow .22s}
.header-inner{display:flex; align-items:center; justify-content:space-between; gap:12px}
.brand{display:flex; align-items:center; gap:10px}
.logo{width:42px; height:42px; border-radius:10px; background:linear-gradient(135deg,#60a5fa,#7dd3fc); display:grid; place-items:center; font-weight:800; color:#012}
.meta{display:flex; flex-direction:column}
.name{font-weight:700; font-size:15px}
.role{font-size:12px; color:var(--muted)}

/* Nav */
nav{display:flex; align-items:center; gap:12px}
.nav-links{display:flex; gap:10px; align-items:center}
.nav-links a{padding:8px 10px; border-radius:8px; font-size:14px; color:var(--muted); text-decoration:none}
.resume-btn{padding:8px 10px; border-radius:10px; background:var(--glass); border:1px solid rgba(255,255,255,0.04); font-weight:700}
#hamburger{display:none; position:relative; z-index:92}

/* Hero */
.hero{display:grid; grid-template-columns:1fr 420px; gap:calc(var(--gap)); align-items:center; margin-top:18px}
.intro h1{font-size:40px; margin:0; line-height:1.02}
.accent-name{background:linear-gradient(90deg,#7dd3fc,#60a5fa); -webkit-background-clip:text; color:transparent}
.intro p{color:var(--muted); margin-top:10px; font-size:15px}
.cta{margin-top:14px; display:flex; gap:12px}
.hero .muted.small{ padding:10px 12px; margin-top:12px; background: rgba(255,255,255,0.02); border-radius:10px }

@media (max-width:720px){
  /* increase padding on small screens for better touch area */
  .hero .muted.small{ padding:14px 16px; margin-top:10px; font-size:14px }
}
.btn{padding:10px 14px; border-radius:12px; text-decoration:none; font-weight:700; background:var(--glass); border:1px solid rgba(255,255,255,0.04); font-size:14px}
.btn.primary{background:var(--accent-grad); color:#012}
.muted{color:var(--muted)}
.small{font-size:13px}

/* accent bubble */
.accent-bubble{position:relative; height:220px; border-radius:10px; overflow:hidden; background:linear-gradient(120deg, rgba(125,211,252,0.06), rgba(96,165,250,0.03)); display:flex; align-items:center; justify-content:center; border:1px solid rgba(255,255,255,0.02)}
.accent-bubble img{max-width:100%; height:auto; border-radius:8px; box-shadow:0 10px 28px rgba(2,6,23,0.5); transition:transform .6s ease}

/* ====== PROJECTS: CSS GRID (uniform cards) ====== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 12px;
}

.project {
  background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
  border-radius: 10px;
  overflow: hidden;
  border:1px solid rgba(255,255,255,0.03);
  transition: transform .2s, box-shadow .2s;
  display:flex;
  flex-direction:column;
  height:100%;
}
.project:hover { transform: translateY(-6px); box-shadow: 0 18px 50px rgba(2,6,23,0.6); }

/* fixed media area for consistent card heights */
.project-media {
  width:100%;
  height:180px;
  overflow:hidden;
  background:linear-gradient(180deg, rgba(0,0,0,0.06), transparent);
}
.project-media img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* project content */
.pcontent{ padding:12px; display:flex; flex-direction:column; gap:8px; flex:1 }
.pcontent h3{ margin:0 0 6px 0; font-size:16px }
.pcontent p{ margin:0; color:var(--muted); font-size:13px }

.tags{ margin-top:auto; display:flex; flex-wrap:wrap; gap:8px }
.tag{ font-size:12px; padding:6px 8px; border-radius:999px; background:rgba(255,255,255,0.02); color:var(--muted) }

/* reveal animation for both sections */
.reveal{ opacity:0; transform:translateY(8px); transition:opacity .6s ease, transform .6s ease }
.reveal.visible{ opacity:1; transform:none }

/* ====== ART: MASONRY (Pinterest-style using columns) ====== */
.masonry-grid {
  column-width: 300px;
  column-gap: 16px;
  width:100%;
  margin-top:12px;
}
.masonry-grid .artwork {
  display:inline-block;
  width:100%;
  margin:0 0 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.01), transparent);
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.03);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  -moz-column-break-inside: avoid;
  transition: transform .28s, box-shadow .28s;
}
.masonry-grid .artwork:hover { transform: translateY(-6px); box-shadow:0 18px 50px rgba(2,6,23,0.6); }

.masonry-grid .artwork img {
  display:block;
  width:100%;
  height:auto; /* preserve aspect ratio */
  object-fit:cover;
}
.masonry-grid .pcontent { padding:10px }

/* Book */
.book-spot{ display:grid; grid-template-columns:260px 1fr; gap:16px; align-items:start; margin-top:14px }
.book-cover{ width:100%; border-radius:8px; overflow:hidden; border:1px solid rgba(255,255,255,0.03); cursor:pointer }
.book-cover img{ display:block; width:100%; height:auto }
.book-info{ padding:8px }
.book-actions{ display:flex; gap:10px; margin-top:12px }
.book-actions .btn{ padding:10px 12px }

/* Modal */
.modal{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:linear-gradient(180deg, rgba(2,6,23,0.9), rgba(2,6,23,0.95)); z-index:120; padding:18px }
.modal.open{ display:flex }
.modal-card{ max-width:1000px; width:100%; background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent); border-radius:12px; padding:18px; border:1px solid rgba(255,255,255,0.03); display:grid; grid-template-columns:1fr 360px; gap:16px }
.modal img{ width:100%; height:auto; border-radius:8px }
.modal .close{ position:absolute; right:18px; top:14px; background:rgba(255,255,255,0.03); border-radius:8px; padding:8px 10px; color:var(--muted); text-decoration:none }
/* Ensure drawer is hidden by default (desktop) and only shown for small viewports */
#drawer {
  display: none;           /* hide on desktop by default */
  pointer-events: none;
}

/* panel should be visually hidden on desktop */
#drawer .panel {
  display: none;
}

/* Mobile responsive */
@media (max-width:880px){
  .nav-links{ display:none }
  /* hide the desktop resume button on small screens (drawer contains Resume) */
  .resume-btn{ display:none }
  #hamburger{ display:inline-grid; position:relative; width:44px; height:44px; border-radius:10px; background:rgba(255, 255, 255, 0.036); color: white; place-items:center; border:0; font-size:18px; z-index:160 }
  #drawer{ display:flex; position:fixed; inset:0; right:0; top:0; z-index:140; pointer-events:none }
  /* keep panel visually hidden and non-interactive when closed to avoid capturing taps */
  #drawer .panel{ display: block; position:relative; margin-left:auto; width:320px; max-width:85vw; background:var(--card); height:100%; padding:20px; box-shadow:-20px 0 40px rgba(2,6,23,0.6); transform:translateX(20px); opacity:0; visibility:hidden; transition:transform .32s ease, opacity .32s ease, visibility 0s linear .32s; border-left:1px solid rgba(255,255,255,0.03); pointer-events:none }
  #drawer.open .panel{ transform:none; opacity:1; visibility:visible; transition-delay:0s; pointer-events:auto }
}

/* Mobile drawer nav layout: make links full-width and aligned */
#drawer .panel nav{ display:flex; flex-direction:column; gap:8px; align-items:stretch }
#drawer .panel nav a { display:block; width:100%; padding:12px 14px; border-radius:10px; text-decoration:none; color:var(--muted); background:transparent; font-weight:700 }
#drawer .panel nav a.resume-btn{ margin-top:8px; background:var(--glass); border:1px solid rgba(255,255,255,0.03); color:var(--text); }
#drawer .panel nav a:hover{ background:rgba(255,255,255,0.02) }

/* drawer close icon button */
.close-drawer{ position:absolute; right:14px; top:14px; width:40px; height:40px; display:inline-grid; place-items:center; background:rgba(255,255,255,0.02); border-radius:10px; border:0; color:var(--muted); cursor:pointer }
.close-drawer svg{ display:block }
.close-drawer:hover{ background:rgba(255,255,255,0.04); color:var(--text) }

@media (max-width:720px){
  .site{ padding:14px }
  .hero{ grid-template-columns:1fr; gap:12px }
  .accent-bubble{ height:160px }
  .hero .intro h1{ font-size:28px }
  .grid{ column-width: 100%; column-gap:12px } /* fallback for any remaining grids */
  .project-media{ height:160px }
  .book-spot{ grid-template-columns:1fr; gap:12px }
  .book-cover{ width:70%; max-width:360px; margin:0 auto; border-radius:10px }
  .book-actions{ flex-direction:column; gap:10px }
  .book-actions .btn{ width:100%; display:block; padding:12px }
  .modal-card{ width:100%; height:100vh; border-radius:0; grid-template-columns:1fr; align-items:start; padding:14px }
  .modal .close{ right:12px; top:12px; padding:10px 12px }
  .pcontent{ padding:10px }
  .resume-btn{ padding:12px 14px }
}
@media (max-width: 980px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Mobile: 1 column */
@media (max-width: 720px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-media {
    height: 180px; /* keeps the card tidy on mobile */
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){ *{ animation:none!important; transition:none!important } }

/* print */
@media print{ body{ background:white; color:black } header, .cta, .nav-panel, .modal{ display:none } }

/* Footer */
.site-footer{
  text-align:center;
  margin:28px 0 8px;
  color:var(--muted);
  font-size:13px;
  padding:8px 12px;
}

/* Under-construction notice */
.site-notice{
  margin-top:12px;
  padding:10px 14px;
  border-radius:10px;
  background: linear-gradient(90deg,#fbbf24,#fb923c);
  color:#012;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid rgba(0,0,0,0.06);
}
.notice-dismiss{
  background:rgba(1,2,3,0.04);
  border:0;
  padding:6px 10px;
  border-radius:8px;
  cursor:pointer;
  font-weight:700;
  color:#012;
}
@media (max-width:720px){ .site-notice{ font-size:14px } }

/* ====== DEBUG HELPERS (temporary) ======
   Add `debug-hints` to the `<body>` to visualize stacking/hit areas
   Example (browser console): `document.body.classList.add('debug-hints')`
*/
.debug-hints #hamburger {
  outline: 3px solid rgba(255,0,255,0.95);
  box-shadow: 0 0 0 6px rgba(255,0,255,0.06);
  background: rgba(255,0,255,0.04) !important;
}
.debug-hints header{ outline: 1px dashed rgba(255,255,255,0.06); }
.debug-hints .nav-links, .debug-hints .resume-btn, .debug-hints .brand, .debug-hints .logo { outline: 2px dashed rgba(0,255,0,0.18); }
.debug-hints #drawer .panel{ outline: 2px solid rgba(0,255,0,0.95); }
.debug-hints a{ background: rgba(255,255,0,0.04); }
.debug-hints *{ transition: none !important; }
@media (max-width:880px){
  .debug-hints #hamburger{ z-index:9999 !important }
  .debug-hints #drawer{ z-index:9998 !important }
}

/* ====== SPLASH SCREEN ====== */
#splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}
#splash.hidden { transform: translateY(-100%); pointer-events: none; }

.splash-text {
  position: relative;
  font-size: 4rem; font-weight: 900;
  color: #eaf4ff;
  letter-spacing: -1px;
  animation: glitch-skew 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}
.splash-text::before, .splash-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}
.splash-text::before {
  left: 2px; text-shadow: -2px 0 #ff00c1;
  clip-path: inset(44% 0 61% 0);
  animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}
.splash-text::after {
  left: -2px; text-shadow: -2px 0 #00fff9;
  clip-path: inset(50% 0 30% 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-skew { 0%, 100% { transform: skew(0deg); } 20% { transform: skew(-2deg); } 40% { transform: skew(2deg); } 60% { transform: skew(0deg); } }
@keyframes glitch-anim-1 { 0% { clip-path: inset(20% 0 80% 0); } 20% { clip-path: inset(60% 0 10% 0); } 40% { clip-path: inset(40% 0 50% 0); } 60% { clip-path: inset(80% 0 5% 0); } 80% { clip-path: inset(10% 0 70% 0); } 100% { clip-path: inset(30% 0 20% 0); } }
@keyframes glitch-anim-2 { 0% { clip-path: inset(10% 0 60% 0); } 20% { clip-path: inset(30% 0 10% 0); } 40% { clip-path: inset(80% 0 5% 0); } 60% { clip-path: inset(10% 0 80% 0); } 80% { clip-path: inset(40% 0 20% 0); } 100% { clip-path: inset(50% 0 30% 0); } }

@media (max-width: 720px) { .splash-text { font-size: 2.5rem; } }
