/* =========================================================
   PORTFOLIO — ACCENT EDITORIAL DESIGN STYLESHEET
   Supports Responsive Theme Adapting Variables
   ========================================================= */

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

/* ── VARIABLE SYSTEM ── */
/* Default System / Dark luxury Theme Configuration */
:root {
  --bg:          #0a0a0a;
  --bg-2:        #111111;
  --bg-3:        #181818;
  --surface:     #1e1e1e;
  --border:      rgba(255,255,255,0.08);
  --border-h:    rgba(255,255,255,0.18);
  --text:        #e8e4dc;
  --text-muted:  #7a7570;
  --text-dim:    #4a4744;
  --accent:      #c9a96e;     /* Luxury Warm Gold */
  --accent-dark: #8a6f42;
  --accent-glow: rgba(201,169,110,0.15);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --nav-h:       72px;
  --section-gap: 120px;
  --container:   1180px;
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light luxury Editorial Palette Mutation */
:root[data-theme="light"] {
  --bg:          #fbf9f4;
  --bg-2:        #f3efe6;
  --bg-3:        #eae4d5;
  --surface:     #ffffff;
  --border:      rgba(0,0,0,0.07);
  --border-h:    rgba(0,0,0,0.16);
  --text:        #181715;
  --text-muted:  #68635c;
  --text-dim:    #9c968d;
  --accent:      #b39254;
  --accent-dark: #7a5f2b;
  --accent-glow: rgba(179,146,84,0.1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

a { color: inherit; text-decoration: none; cursor: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
button { cursor: none; border: none; background: none; font-family: inherit; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 2px; }

::selection { background: var(--accent); color: var(--bg); }

/* Custom Moving Cursor Layer */
.cursor {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, background 0.2s;
}
.cursor-follower {
  width: 36px; height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease-out), opacity 0.3s;
}
body:has(a:hover) .cursor, body:has(button:hover) .cursor { transform: translate(-50%, -50%) scale(2.5); }
body:has(a:hover) .cursor-follower, body:has(button:hover) .cursor-follower { opacity: 0; }

/* Preloader styles */
.loader {
  position: fixed; inset: 0; background: var(--bg); z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-text { font-family: var(--font-display); font-size: 2.5rem; letter-spacing: 0.3em; display: block; margin-bottom: 24px; }
.loader-bar { width: 200px; height: 1px; background: var(--border); margin: 0 auto; overflow: hidden; }
.loader-progress { height: 100%; background: var(--accent); width: 0; animation: load 1.8s var(--ease-out) forwards; }
@keyframes load { to { width: 100%; } }

/* ── NAVIGATION ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 3rem); z-index: 1000;
  border-bottom: 1px solid transparent; transition: background 0.4s, border-color 0.4s;
}
.nav.scrolled { background: var(--bg); border-color: var(--border); box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
.nav-logo { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.05em; font-weight: 400; }
.nav-logo:hover { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-link { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 1.5rem; }

/* Theme Switcher Toggle styling */
.theme-toggle-btn {
  color: var(--text-muted); transition: color 0.2s; display: flex; align-items: center; justify-content: center;
}
.theme-toggle-btn:hover { color: var(--accent); }
:root[data-theme="light"] .sun-icon { display: none; }
:root[data-theme="light"] .moon-icon { display: block; }
:root[data-theme="dark"] .sun-icon { display: block; }
:root[data-theme="dark"] .moon-icon { display: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 1px; background: var(--text); transition: 0.3s; }

/* Mobile Menu overlay */
.mobile-menu {
  position: fixed; inset: 0; background: var(--bg-2); z-index: 999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: 0.3s var(--ease-out);
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu ul { text-align: center; }
.mobile-menu li { margin: 1.5rem 0; }
.mobile-link { font-family: var(--font-display); font-size: 2.2rem; color: var(--text-muted); }
.mobile-link:hover { color: var(--accent); }

/* ── LAYOUT SECTIONS ── */
.section { padding: var(--section-gap) 0; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 3rem); }
.section-header { margin-bottom: 50px; }
.section-label { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; display: block; }
.section-title { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.5rem); font-weight: 300; letter-spacing: -0.01em; }

/* ── HERO ── */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; padding-top: var(--nav-h); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-grain { position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E"); opacity: 0.4; }
.hero-glow { position: absolute; top: -10%; left: -10%; width: 50%; height: 70%; background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%); transition: transform 0.1s linear; }
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 0 clamp(1.5rem, 4vw, 3rem); }
.hero-eyebrow { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 15px; color: var(--text-muted); }
.hero-name { font-family: var(--font-display); font-size: clamp(3.2rem, 8vw, 6.5rem); font-weight: 300; line-height: 1.05; margin-bottom: 20px; }
.hero-name .line { display: block; }
.hero-name .accent { color: var(--accent); font-style: italic; }
.hero-title { font-family: var(--font-body); font-size: clamp(1.1rem, 2.5vw, 1.6rem); font-weight: 400; color: var(--text); margin-bottom: 12px; }
.hero-tagline { font-size: clamp(0.95rem, 1.8vw, 1.15rem); color: var(--text-muted); max-width: 550px; margin-bottom: 40px; font-weight: 300; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 14px 28px; border-radius: 0px; transition: 0.3s var(--ease-out); }
.btn-primary { background: var(--accent); color: var(--bg); font-weight: 500; }
.btn-primary:hover { background: var(--accent-dark); color: #ffffff; transform: translateY(-2px); box-shadow: 0 10px 30px var(--accent-glow); }
.btn-ghost { border: 1px solid var(--border-h); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-scroll { position: absolute; bottom: 40px; left: clamp(1.5rem, 4vw, 3rem); display: flex; align-items: center; gap: 15px; font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-dim); transform: rotate(-90deg); transform-origin: left bottom; }
.scroll-line { width: 40px; height: 1px; background: var(--border-h); }
.hero-socials { position: absolute; right: clamp(1.5rem, 4vw, 3rem); bottom: 40px; display: flex; flex-direction: column; gap: 20px; z-index: 10; }
.social-link { color: var(--text-muted); transition: color 0.2s, transform 0.2s; }
.social-link:hover { color: var(--accent); transform: translateY(-3px); }

/* ── REVEAL TRIGGERS ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }

/* ── ABOUT SECTION & PHOTO RECTANGLE FRAME ── */
.about-grid { display: grid; grid-template-columns: 4fr 5fr; gap: 80px; align-items: start; }
.about-image { position: relative; }
.image-frame {
  position: relative; border: 1px solid var(--border-h); padding: 12px; background: var(--bg-2);
  border-radius: 0px; /* Force Minimalistic Rectangle Frame */
  overflow: hidden; transition: border-color 0.3s;
}
.image-frame img { width: 100%; height: auto; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.image-frame:hover img { transform: scale(1.02); }
.image-frame:hover { border-color: var(--accent); }
.image-overlay { position: absolute; inset: 12px; background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.1)); pointer-events: none; }
.image-tag { position: absolute; bottom: -20px; right: 20px; background: var(--surface); border: 1px solid var(--border); padding: 6px 14px; font-family: var(--font-mono); font-size: 0.72rem; }

.about-bio { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 24px; font-weight: 300; }
.about-stats { display: flex; gap: 40px; margin-top: 40px; border-top: 1px solid var(--border); padding-top: 30px; }
.stat-number { font-family: var(--font-display); font-size: 2.2rem; color: var(--accent); display: block; }
.stat-label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── EDUCATION AND EXPERIENCE GRID ── */
.resume-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.resume-subheading { font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; color: var(--accent); margin-bottom: 30px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.resume-timeline { display: flex; flex-direction: column; gap: 35px; }
.resume-item { display: flex; align-items: flex-start; gap: 20px; }
.resume-logo { 
  width: 52px; height: 52px; 
  border-radius: 50%; /* Force perfectly left-most circular logo design */
  object-fit: cover; background: var(--surface); 
  border: 1px solid var(--border-h); padding: 3px; 
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.resume-logo:hover { transform: scale(1.08); border-color: var(--accent); }
.resume-details h4 { font-size: 1.15rem; font-weight: 500; margin-bottom: 4px; line-height: 1.3; }
.resume-title-link { transition: color 0.2s; }
.resume-title-link:hover { color: var(--accent); }
.resume-meta { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 300; }
.resume-year { font-family: var(--font-mono); font-size: 0.74rem; color: var(--accent); background: var(--accent-glow); padding: 3px 10px; border-radius: 2px; display: inline-block; }

/* ── SELECTED PROJECTS LIST ── */
.projects-list { display: flex; flex-direction: column; }
.project-item { display: grid; grid-template-columns: 4fr 5fr; gap: 50px; padding: 40px 0; border-bottom: 1px solid var(--border); }
.project-meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-dim); display: flex; flex-direction: column; gap: 8px; }
.project-number { font-size: 1.2rem; color: var(--accent); font-family: var(--font-display); }
.project-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 400; margin-bottom: 15px; }
.project-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; }
.project-stack { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.project-stack span { background: var(--bg-2); padding: 4px 10px; border: 1px solid var(--border); }
.project-links { display: flex; gap: 20px; font-family: var(--font-mono); font-size: 0.75rem; }
.project-link:hover { color: var(--accent); }
.project-image img { border: 1px solid var(--border); background: var(--bg-2); width: 100%; height: auto; }

/* ── CONTACT WRAPPER & SOCIAL FOOTER STYLING ── */
.contact-wrapper { display: grid; grid-template-columns: 4fr 5fr; gap: 60px; }
.contact-intro { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 35px; }
.contact-details { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.contact-item { display: block; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.contact-label { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; color: var(--text-dim); display: block; }
.contact-value { font-size: 1.05rem; color: var(--text); font-weight: 400; }
.contact-item:hover .contact-value { color: var(--accent); }

/* Social Icons Container in Footer Contact Section */
.contact-socials-footer { display: flex; gap: 20px; font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.contact-socials-footer a { color: var(--text-muted); border-bottom: 1px solid transparent; transition: 0.2s; }
.contact-socials-footer a:hover { color: var(--accent); border-color: var(--accent); }

.contact-form { display: flex; flex-direction: column; gap: 24px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; color: var(--text-muted); }
.form-group input, .form-group textarea { background: var(--bg-2); border: 1px solid var(--border); padding: 14px; color: var(--text); font-family: inherit; font-size: 0.95rem; border-radius: 0px; transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }

/* ── FOOTER STYLING ── */
.footer { border-top: 1px solid var(--border); padding: 40px 0; background: var(--bg-2); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-dim); }

/* ── MOVE TO TOP FLOATING BUTTON ── */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-h); width: 44px; height: 44px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; z-index: 999;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--ease-out), background-color 0.3s;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); transform: translateY(-4px); }

/* ── RESPONSIVE MEDIA BREAKPOINTS ── */
@media (max-width: 992px) {
  .about-grid, .resume-grid, .contact-wrapper { grid-template-columns: 1fr; gap: 45px; }
  .project-item { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
  :root { --section-gap: 80px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  body.menu-open { overflow: hidden; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}