:root{
  /* base tokens - dark mode */
  --bg-900: #070707;
  --bg-800: #0f0f10;
  --card: rgba(255,255,255,0.04);
  --glass: rgba(255,255,255,0.03);
  --coral: #ff6f61;
  --muted: #bdbdbd;
  --accent-glow: 0 8px 30px rgba(255,111,97,0.12);
  --radius: 14px;
  --container-padding: 10px 6%;
  --max-width: 1200px;
  --accent: #ff6f61;

  --bg: linear-gradient(180deg,var(--bg-900),var(--bg-800));
  --text: #eaeaea;
  --card-bg: var(--card);
  --glass-bg: var(--glass);
  --muted-color: var(--muted);
  --accent-shadow: var(--accent-glow);
  --accent-color: var(--accent);
}

/* Light theme override */
body.light {
  --bg-900: #f0e5e5;
  --bg-800: #f9d6d6;
  --card: rgba(255,255,255,0.85);
  --glass: rgba(255,255,255,0.5);
  --muted: #6b6b6b;

  --bg: linear-gradient(180deg,#f0e5e5,#f9d6d6);
  --text: #101010;
  --card-bg: var(--card);
  --glass-bg: var(--glass);
  --muted-color: var(--muted);
  --accent-shadow: 0 10px 28px rgba(255,111,97,0.2);
  --accent-color: var(--accent);
}

/* transition helper used during theme switch */
html.theme-fading * { transition: background-color .38s ease, color .38s ease, border-color .38s ease, box-shadow .38s ease, opacity .38s ease, transform .38s ease; }

/* Base */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
  min-height:100vh;
  transition: background .38s ease, color .38s ease;
}

/* Container */
.container{
  width:100%;
  max-width:var(--max-width);
  margin:0 auto;
  padding:var(--container-padding);
  transition:padding .25s ease;
}

/* Header / Nav */
.site-header{
  position:fixed;
  width:100%;
  top:0;
  left:0;
  z-index:1200;
  background:linear-gradient(180deg, rgba(7,7,7,0.6), rgba(7,7,7,0.15));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background .38s ease, border-color .38s ease;
}

/* light header */
body.light .site-header{
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.4));
  border-bottom: 1px solid rgba(16,16,16,0.04);
}

/* nav internal row */
.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  position:relative;
  padding:12px 0;
}

.logo{height:48px; width:auto; display:block; object-fit:contain}

/* Theme toggle button */
.theme-toggle{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:42px;
  height:42px;
  border-radius:10px;
  background:transparent;
  border:1px solid rgba(255,255,255,0.04);
  color:var(--muted-color);
  cursor:pointer;
  font-size:18px;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
  margin-left:12px;
}
.theme-toggle:focus{outline:2px solid rgba(0,0,0,0.08); outline-offset:2px}
.theme-toggle:hover{transform:translateY(-3px)}
.theme-toggle.active{
  color:var(--accent-color);
  border-color: rgba(255,111,97,0.18);
  box-shadow: var(--accent-shadow);
  background: linear-gradient(90deg, rgba(255,111,97,0.04), rgba(255,111,97,0.01));
}
.theme-icon{line-height:1; font-size:18px; display:inline-block}

/* Nav toggle for mobile */
.nav-toggle{
  background:transparent;border:0;color:inherit;font-size:20px;cursor:pointer;display:none;
}

/* Nav list */
.nav{
  display:flex;
  align-items:center;
}
.nav-list{
  list-style:none; display:flex; gap:22px; align-items:center;
}
.nav-list li{position:relative}
.nav-link{
  color:var(--muted-color); text-decoration:none; font-weight:600; padding:10px 6px; font-size:15px; border-radius:8px;
  transition: all .25s ease;
}
.nav-link:hover{color:var(--text); transform:translateY(-2px)}
.nav-link.active{
  color:var(--text);
  box-shadow: inset 0 -3px 0 var(--accent-color);
  background: linear-gradient(90deg, rgba(255,111,97,0.06), transparent);
}

/* Mobile nav closed by default */
.nav.open{
  position:fixed; right:0; top:0; bottom:0; width:280px; background:linear-gradient(180deg,#0b0b0b, #0f0f10);
  padding:60px 20px; transform:translateX(0); box-shadow:var(--accent-shadow);
}
.nav-close{display:none}

/* Hero */
.hero{
  min-height:88vh;
  display:flex;
  align-items:center;
  position:relative;
  padding-top:80px;
  padding-bottom:40px;
  overflow:hidden;
}
.hero-overlay{
  position:absolute; inset:0; background-image: url('background.png'); background-size:cover; background-position:center;
  filter:brightness(0.35) saturate(0.9);
  transform: scale(1.02);
  z-index:0;
}
.hero-content{
  display:flex;
  gap:40px;
  align-items:center;
  justify-content:space-between;
  position:relative;
  z-index:2;
  padding-top:40px;
}
.hero-text{flex:1; max-width:720px; animation: slideUp .8s ease both;}
.eyebrow{color:var(--muted-color); font-weight:600; margin-bottom:10px; letter-spacing:0.4px}
.hero-text h1{
  font-family: 'Poppins', sans-serif;
  font-size:44px;
  line-height:1.02;
  margin-bottom:10px;
  color:var(--text);
}
.hero-text h1 .accent{color:var(--accent-color)}
.lead{color: var(--muted-color); margin-bottom:20px; font-size:16px}
.hero-cta{display:flex; gap:12px; align-items:center}
.btn{
  display:inline-flex; align-items:center; gap:10px; padding:12px 20px; border-radius:10px; text-decoration:none; cursor:pointer;
  font-weight:600; transition:all .25s ease; transform: translateZ(0);
}
.btn.primary{
  background:linear-gradient(90deg,var(--accent-color), #ff846f);
  color:#fff;
  box-shadow: var(--accent-shadow);
  border:0;
}
.btn.primary:hover{transform:translateY(-6px) scale(1.01); box-shadow:0 18px 40px rgba(255,111,97,0.14)}
.btn.ghost{background:transparent; border:1px solid rgba(255,255,255,0.06); color:var(--text)}
.btn.outline{background:transparent; border:1px solid rgba(255,255,255,0.08); color:var(--accent-color)}
body.light .btn.ghost{border-color: rgba(16,16,16,0.06); color:var(--text)}

/* hero card */
.hero-card{
  width:260px; min-width:220px;
  background: var(--card-bg);
  border:1px solid rgba(255,255,255,0.04);
  border-radius:18px; padding:12px; display:flex; gap:12px; align-items:center;
  box-shadow: var(--accent-shadow);
  backdrop-filter: blur(6px);
  animation: fadeIn .9s ease both;
  transition: transform .22s ease, box-shadow .22s ease;
}
.hero-card:hover{ transform: translateY(-6px); box-shadow: 0 18px 40px rgba(255,111,97,0.12) }
.hero-img{width:72px; height:72px; object-fit:cover; border-radius:12px; border:2px solid rgba(255,255,255,0.04)}
.hero-card-meta p{margin:0; font-size:13px; color:var(--muted-color)}

/* Sections */
.section{padding:80px 0}
.section-title{font-size:28px; font-weight:700; color:var(--text); margin-bottom:18px}

/* About */
.about-grid{display:grid; grid-template-columns:1fr 320px; gap:36px; align-items:center}
.about-photo{width:100%; border-radius:16px; object-fit:cover; border:1px solid rgba(255,255,255,0.04)}
.about-paragraph{color:var(--muted-color); margin-bottom:18px}

/* Tabs */
.tabs{margin-top:14px}
.tab-titles{display:flex; gap:12px; margin-bottom:12px}
.tab-link{
  background:transparent; border:1px solid rgba(255,255,255,0.04); color:var(--muted-color);
  padding:8px 12px; border-radius:10px; cursor:pointer; font-weight:600; transition: all .18s ease;
}
.tab-link.active{background: linear-gradient(90deg, rgba(255,111,97,0.08), transparent); color:var(--text); border-color: rgba(255,111,97,0.12)}
.tab-panel{display:none; color:var(--muted-color)}
.tab-panel.active{display:block}

/* Services */
.services-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:22px; margin-top:20px}
.card{background:var(--card-bg); border-radius:var(--radius); padding:24px; border:1px solid rgba(255,255,255,0.03); transition:transform .28s ease, box-shadow .28s ease}
.card:hover{transform:translateY(-8px); box-shadow:0 18px 40px rgba(255,111,97,0.10)}
.service-icon{font-size:36px; color:var(--accent-color); margin-bottom:8px}

/* Portfolio */
.works-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:20px; margin-top:18px}
.work-card{position:relative; overflow:hidden; border-radius:14px; background:var(--glass-bg); border:1px solid rgba(255,255,255,0.03)}
.work-card img{width:100%; height:180px; object-fit:cover; display:block}
.work-info{padding:16px; display:flex; gap:12px; align-items:start; justify-content:space-between}
.work-info h3{margin:0; font-size:16px}
.work-info p{margin:8px 0 0; font-size:13px; color:var(--muted-color)}
.work-link{display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:10px; background:#fff; color:var(--accent-color); text-decoration:none; box-shadow: 0 6px 18px rgba(0,0,0,0.4)}

/* Contact */
.contact-grid{display:grid; grid-template-columns:1fr 420px; gap:30px; align-items:start}
.contact-line{color:var(--muted-color); margin-bottom:10px}
.social a{display:inline-block; margin-right:12px; color:var(--muted-color); font-size:18px}
.social a:hover{color:var(--accent-color)}
.form input, .form textarea{
  width:100%; padding:12px 14px; border-radius:10px; background:#0f0f10; border:1px solid rgba(255,255,255,0.03);
  color:#efefef; margin-bottom:12px; font-size:15px; outline:none; transition:box-shadow .18s ease, border-color .18s ease;
}
.form input:focus, .form textarea:focus{box-shadow:0 6px 22px rgba(255,111,97,0.06); border-color:rgba(255,111,97,0.18)}
body.light .form input, body.light .form textarea { background: #fff; color: #111; border:1px solid rgba(16,16,16,0.06); }

/* Footer small */
.site-footer{padding:18px 0; border-top:1px solid rgba(255,255,255,0.02); margin-top:24px; text-align:center; color:var(--muted-color)}
.site-footer .heart{color:var(--accent-color)}

/* Scroll to top */
#scrollTop{position:fixed; right:22px; bottom:22px; background:var(--accent-color); color:#fff; border:0; width:44px; height:44px; border-radius:10px; display:flex; align-items:center; justify-content:center; box-shadow:var(--accent-shadow); cursor:pointer; opacity:0; transform:translateY(8px); transition:all .28s ease; z-index:1400}
#scrollTop.visible{opacity:1; transform:translateY(0)}

/* Animations: reveal on scroll */
.reveal{opacity:0; transform:translateY(12px); transition:opacity .6s ease, transform .6s ease;}
.reveal.in-view{opacity:1; transform:translateY(0); transition-duration:.6s;}

/* Specific staggered children reveal */
.services-grid .card, .works-grid .work-card, .about-right, .hero-card, .contact-form {
  will-change: transform, opacity;
  transition: transform .6s cubic-bezier(.16,.84,.44,1), opacity .6s ease;
}
.reveal.in-view .card,
.reveal.in-view .work-card,
.reveal.in-view .about-right,
.reveal.in-view .hero-card,
.reveal.in-view .contact-form {
  opacity:1; transform:none;
}

/* Keyframes */
@keyframes slideUp{from{opacity:0; transform:translateY(12px)} to{opacity:1; transform:none}}
@keyframes fadeIn{from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:none}}

/* Responsive base */
@media (max-width:1000px){
  .about-grid{grid-template-columns:1fr 260px}
  .contact-grid{grid-template-columns:1fr}
}
@media (max-width:800px){
  .nav-toggle{display:block}
  .nav{display:none}
  .nav.open{display:block}
  .nav-list{flex-direction:column; gap:18px}
  .nav-close{display:block; margin-top:12px}
  .hero-content{flex-direction:column; align-items:flex-start}
  .hero-card{width:100%; display:flex; margin-top:18px}
  .hero-text h1{font-size:30px}
  .hero{min-height:72vh}
  .theme-toggle{position:relative; margin-left:12px}
}
@media (max-width:520px){
  .container{padding:12px 5%}
  .hero-text h1{font-size:26px}
  .hero-img{width:60px;height:60px}
  .services-grid{grid-template-columns:1fr}
  .works-grid{grid-template-columns:1fr}
  .hero-card{padding:10px}
  .logo{height:40px}
}

/* ===== FINAL MOBILE NAV OVERLAY WITH phonebackground.png ===== */
@media (max-width: 800px) {
  .nav.open {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;

    background-image: url("phonebackground.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    --overlay: rgba(0,0,0,0.72);
    --overlay-light: rgba(255,255,255,0.6);
    background-color: var(--overlay);
    background-blend-mode: overlay;

    backdrop-filter: blur(6px);
    z-index: 9999;
    padding: 100px 1.5rem 2rem;
    overflow-y: auto;
    transition: opacity 0.28s ease, transform 0.28s ease;
    opacity: 1;
    transform: translateY(0);
  }
  body.light .nav.open {
    background-color: var(--overlay-light);
    background-blend-mode: overlay;
  }
  .nav.open::before{
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.55));
    pointer-events: none;
  }
  body.light .nav.open::before{
    background: linear-gradient(180deg, rgba(255,255,255,0.25), rgba(255,255,255,0.35));
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    position: relative;
    z-index: 2;
  }

  .nav-link {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s, transform 0.18s;
    padding-left: 0.25rem;
  }

  .nav-link:hover {
    color: var(--accent-color);
    transform: translateX(6px);
  }

  .nav-toggle {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10000;
    background: transparent;
    border: none;
    color: #fff;
  }

  .nav-close {
    display: block;
    position: absolute;
    top: 1.4rem;
    left: 1.4rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
  }

  .theme-toggle {
    position: absolute;
    top: 1.2rem;
    right: 3.8rem;
    z-index: 10001;
  }
}

/* small tweaks */
a { color: inherit; }

/* Small devices: change only the hero/header background */
@media (max-width: 800px) {
  .hero {
    background: url("phonebackground.png") center center / cover no-repeat;
    position: relative;
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
  }
  .hero-content { position: relative; z-index: 2; }
  .hero-overlay { display: none; }
}

/* ===== About Section Responsive Adjustments ===== */
@media (max-width: 800px) {
  .about-grid { display: flex; flex-direction: column; align-items: center; gap: 20px; }
  .about-right { order: 1; width: 80%; max-width: 300px; }
  .about-left { order: 2; width: 90%; text-align: center; }
  .about-left h2.section-title { font-size: 24px; }
  .about-paragraph { font-size: 15px; line-height: 1.5; margin-bottom: 16px; }
  .tabs { width: 100%; }
  .tab-titles { justify-content: center; }
  .tab-link { padding: 8px 10px; font-size: 14px; }
  .tab-panel { text-align: center; }
}
