:root {
  --sky-deep:    #060d1a;
  --sky-mid:     #0d1f3c;
  --sky-blue:    #1a3a6b;
  --sky-light:   #2e6db4;
  --sky-pale:    #a8d4f5;
  --cloud-white: #f0f6ff;
  --accent:      #5bb8ff;
  --accent2:     #ffd166;
  --text-main:   #e8f2fc;
  --text-muted:  #8ab4d4;
  --card-bg:     rgba(13, 31, 60, 0.75);
  --border:      rgba(90, 160, 220, 0.18);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--sky-deep); color: var(--text-main); overflow-x: hidden; }
#stars-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 4rem; background: rgba(6, 13, 26, 0.7); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); transition: padding 0.3s; }
nav.scrolled { padding: 0.8rem 4rem; }
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 48px; width: auto; display: block; filter: brightness(0) invert(1) drop-shadow(0 0 6px rgba(91,184,255,0.4)); transition: opacity 0.2s; }
.nav-logo:hover img { opacity: 0.85; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); }
#home { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding: 8rem 2rem 4rem; }
.sky-gradient { position: absolute; inset: 0; background: linear-gradient(180deg, #060d1a 0%, #0a1628 20%, #0f2444 45%, #1a3a6b 70%, #2e6db4 88%, #a8d4f5 100%); z-index: 1; }
.clouds-layer { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; will-change: transform; }
.cloud { position: absolute; pointer-events: none; }
.cloud-inner { position: relative; width: 100%; height: 100%; }
.cloud-inner::before, .cloud-inner::after, .cloud-inner span, .cloud-inner em, .cloud-inner b { content: ''; position: absolute; background: rgba(220, 238, 255, 0.82); border-radius: 50%; display: block; }
.c1 { width: 320px; height: 80px; top: 76%; animation: drift 35s linear infinite; }
.c1 .cloud-inner::before { width: 140px; height: 90px; bottom: 10px; left: 20px; }
.c1 .cloud-inner::after  { width: 110px; height: 80px; bottom: 10px; left: 90px; }
.c1 .cloud-inner span    { width: 90px;  height: 70px; bottom: 10px; left: 160px; }
.c1 .cloud-inner em      { width: 70px;  height: 55px; bottom: 10px; left: 230px; }
.c1 .cloud-inner b       { width: 300px; height: 45px; bottom: 0;    left: 10px; border-radius: 40px; }
.c2 { width: 220px; height: 60px; top: 80%; left: 25%; animation: drift 45s linear infinite 6s; }
.c2 .cloud-inner::before { width: 100px; height: 70px; bottom: 8px; left: 15px; }
.c2 .cloud-inner::after  { width: 80px;  height: 60px; bottom: 8px; left: 75px; }
.c2 .cloud-inner span    { width: 65px;  height: 50px; bottom: 8px; left: 135px; }
.c2 .cloud-inner em      { width: 200px; height: 32px; bottom: 0;   left: 10px; border-radius: 30px; }
.c3 { width: 400px; height: 100px; top: 72%; left: 45%; animation: drift 38s linear infinite 2s; }
.c3 .cloud-inner::before { width: 160px; height: 110px; bottom: 12px; left: 30px; }
.c3 .cloud-inner::after  { width: 130px; height: 95px;  bottom: 12px; left: 120px; }
.c3 .cloud-inner span    { width: 110px; height: 80px;  bottom: 12px; left: 210px; }
.c3 .cloud-inner em      { width: 85px;  height: 65px;  bottom: 12px; left: 295px; }
.c3 .cloud-inner b       { width: 370px; height: 50px;  bottom: 0;    left: 15px; border-radius: 45px; }
.c4 { width: 180px; height: 50px; top: 84%; left: 70%; animation: drift 50s linear infinite 10s; }
.c4 .cloud-inner::before { width: 80px;  height: 60px; bottom: 6px; left: 10px; }
.c4 .cloud-inner::after  { width: 65px;  height: 50px; bottom: 6px; left: 65px; }
.c4 .cloud-inner span    { width: 55px;  height: 42px; bottom: 6px; left: 115px; }
.c4 .cloud-inner em      { width: 165px; height: 28px; bottom: 0;   left: 8px; border-radius: 28px; }
.c5 { width: 350px; height: 88px; top: 74%; left: 90%; animation: drift 32s linear infinite 4s; }
.c5 .cloud-inner::before { width: 150px; height: 100px; bottom: 10px; left: 25px; }
.c5 .cloud-inner::after  { width: 120px; height: 85px;  bottom: 10px; left: 110px; }
.c5 .cloud-inner span    { width: 100px; height: 75px;  bottom: 10px; left: 200px; }
.c5 .cloud-inner b       { width: 325px; height: 44px;  bottom: 0;    left: 12px; border-radius: 42px; }
.c6 { width: 260px; height: 65px; top: 78%; left: -15%; animation: drift 42s linear infinite 15s; }
.c6 .cloud-inner::before { width: 115px; height: 75px; bottom: 8px; left: 18px; }
.c6 .cloud-inner::after  { width: 95px;  height: 65px; bottom: 8px; left: 90px; }
.c6 .cloud-inner span    { width: 75px;  height: 55px; bottom: 8px; left: 165px; }
.c6 .cloud-inner em      { width: 240px; height: 36px; bottom: 0;   left: 10px; border-radius: 35px; }
.c7 { width: 440px; height: 110px; top: 86%; left: 10%; animation: drift 28s linear infinite 8s; }
.c7 .cloud-inner::before { width: 180px; height: 120px; bottom: 14px; left: 35px; background: rgba(235,248,255,0.92) !important; }
.c7 .cloud-inner::after  { width: 145px; height: 105px; bottom: 14px; left: 140px; background: rgba(235,248,255,0.92) !important; }
.c7 .cloud-inner span    { width: 120px; height: 88px;  bottom: 14px; left: 255px; background: rgba(235,248,255,0.92) !important; }
.c7 .cloud-inner em      { width: 90px;  height: 70px;  bottom: 14px; left: 340px; background: rgba(235,248,255,0.92) !important; }
.c7 .cloud-inner b       { width: 410px; height: 55px;  bottom: 0;    left: 18px; border-radius: 50px; background: rgba(235,248,255,0.92) !important; }
.c8 { width: 300px; height: 75px; top: 88%; left: 60%; animation: drift 40s linear infinite 12s; }
.c8 .cloud-inner::before { width: 130px; height: 85px; bottom: 10px; left: 22px; background: rgba(235,248,255,0.88) !important; }
.c8 .cloud-inner::after  { width: 105px; height: 72px; bottom: 10px; left: 105px; background: rgba(235,248,255,0.88) !important; }
.c8 .cloud-inner span    { width: 88px;  height: 60px; bottom: 10px; left: 190px; background: rgba(235,248,255,0.88) !important; }
.c8 .cloud-inner b       { width: 278px; height: 40px; bottom: 0;    left: 12px; border-radius: 38px; background: rgba(235,248,255,0.88) !important; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-120vw); } }
.horizon-glow { position: absolute; bottom: 0; left: 0; right: 0; height: 35%; background: linear-gradient(to top, rgba(90,160,220,0.15), transparent); z-index: 3; }
.hero-content { position: relative; z-index: 10; max-width: 820px; will-change: transform; }
.hero-name { font-family: 'Cormorant Garamond', serif; font-size: clamp(3.5rem, 9vw, 7rem); font-weight: 300; line-height: 1.05; letter-spacing: -0.01em; color: var(--cloud-white); opacity: 0; animation: fadeUp 0.9s ease forwards 0.5s; }
.hero-name em { font-style: italic; color: var(--accent); }
.typed-cursor { display: inline-block; width: 2px; background: var(--accent); margin-left: 2px; animation: cursorBlink 0.7s step-end infinite; vertical-align: baseline; position: relative; top: -0.05em; }
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-tagline { margin-top: 1.4rem; font-size: 1.1rem; font-weight: 300; color: var(--sky-pale); letter-spacing: 0.02em; opacity: 0; animation: fadeUp 0.9s ease forwards 0.7s; }
.hero-cta { margin-top: 2.8rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; opacity: 0; animation: fadeUp 0.9s ease forwards 0.9s; }
.btn { padding: 0.75rem 2rem; border-radius: 3px; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; transition: all 0.25s; cursor: pointer; border: none; }
.btn-primary { background: var(--accent); color: var(--sky-deep); }
.btn-primary:hover { background: #7fceff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--text-main); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.scroll-hint { position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; animation: fadeIn 1s ease forwards 1.5s; opacity: 0; }
.scroll-line { width: 1px; height: 48px; background: linear-gradient(to bottom, var(--accent), transparent); animation: scrollPulse 2s ease-in-out infinite; }
@keyframes scrollPulse { 0%, 100% { opacity: 0.4; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(1.1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }
section { position: relative; z-index: 10; padding: 7rem 2rem; }
.container { max-width: 1060px; margin: 0 auto; }
.section-label { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.25em; color: var(--accent); text-transform: uppercase; margin-bottom: 0.6rem; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; color: var(--cloud-white); line-height: 1.15; margin-bottom: 3.5rem; }
#about { background: linear-gradient(180deg, var(--sky-deep) 0%, #0a1f3f 100%); }
.about-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 5rem; align-items: start; }
.about-photo-wrap { position: relative; }
.about-photo-wrap::before { content: ''; position: absolute; inset: -12px -12px 12px 12px; border: 1px solid var(--border); border-radius: 4px; z-index: 0; }
.about-photo-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(91,184,255,0.08), transparent); border-radius: 4px; z-index: 1; }
.about-photo { width: 100%; height: 480px; object-fit: cover; object-position: center top; border-radius: 4px; display: block; position: relative; z-index: 2; filter: grayscale(10%) contrast(1.05) brightness(1.05); }
.about-text p { font-size: 1rem; line-height: 1.85; color: var(--text-muted); margin-bottom: 1.4rem; font-weight: 300; }
.about-text p strong { color: var(--text-main); font-weight: 500; }
.interests { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.interest-tag { padding: 0.4rem 1rem; border: 1px solid var(--border); border-radius: 2px; font-size: 0.78rem; color: var(--sky-pale); letter-spacing: 0.05em; background: rgba(91,184,255,0.05); transition: all 0.2s; }
.interest-tag:hover { border-color: var(--accent); color: var(--accent); }
#Skills { background: linear-gradient(180deg, #0a1f3f 0%, #0d2548 100%); }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.skill-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1.8rem; backdrop-filter: blur(12px); transition: border-color 0.25s, transform 0.25s; }
.skill-card:hover { border-color: rgba(91,184,255,0.4); transform: translateY(-4px); }
.skill-card-title { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--accent); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag { background: rgba(91,184,255,0.08); color: var(--sky-pale); padding: 0.3rem 0.75rem; border-radius: 2px; font-size: 0.78rem; border: 1px solid rgba(91,184,255,0.12); }
#Projects { background: linear-gradient(180deg, #0d2548 0%, #081530 100%); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.8rem; }
.project-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; backdrop-filter: blur(12px); transition: transform 0.3s, border-color 0.3s; display: flex; flex-direction: column; cursor: pointer; }
.project-card:hover { transform: translateY(-6px); border-color: rgba(91,184,255,0.35); }
.project-card.expanded, .project-card.expanded:hover { transform: none; border-color: rgba(91,184,255,0.45); }
.project-img { width: 100%; height: 190px; object-fit: cover; display: block; filter: brightness(0.85) saturate(0.9); transition: filter 0.3s; }
.project-card:hover .project-img { filter: brightness(1) saturate(1.05); }
.project-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.project-title { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 400; color: var(--cloud-white); margin-bottom: 0.7rem; line-height: 1.3; }
.project-desc { font-size: 0.87rem; color: var(--text-muted); line-height: 1.7; font-weight: 300; max-height: 5.1em; overflow: hidden; transition: max-height 0.45s ease; }
.project-card.expanded .project-desc { max-height: 40em; }
.project-tag { display: inline-block; margin-top: 1.2rem; font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; border-top: 1px solid var(--border); padding-top: 0.9rem; width: 100%; }
.project-toggle { display: flex; align-items: center; gap: 0.4rem; margin-top: 1rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; transition: color 0.2s; }
.project-card:hover .project-toggle { color: var(--accent); }
.project-toggle svg { transition: transform 0.35s ease; flex-shrink: 0; }
.project-card.expanded .project-toggle { color: var(--accent); }
.project-card.expanded .project-toggle svg { transform: rotate(180deg); }
#Links { background: linear-gradient(180deg, #081530 0%, #060d1a 100%); }
.links-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.link-card { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 2rem; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); text-decoration: none; color: var(--text-main); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.04em; transition: all 0.25s; backdrop-filter: blur(12px); }
.link-card:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
footer { position: relative; z-index: 10; text-align: center; padding: 3rem 2rem; background: var(--sky-deep); border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.82rem; letter-spacing: 0.06em; }
footer a { color: var(--accent); text-decoration: none; }
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
#cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 520px; height: 520px;
  margin-left: -260px; margin-top: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,184,255,0.09) 0%, rgba(91,184,255,0.04) 45%, transparent 70%);
  pointer-events: none;
  z-index: 5;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.6s ease;
}
@media (max-width: 768px) {
  nav { padding: 0.9rem 1.2rem; flex-wrap: wrap; gap: 0.5rem; }
  nav.scrolled { padding: 0.7rem 1.2rem; }
  .nav-logo img { height: 36px; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.75rem; letter-spacing: 0.05em; }
  .clouds-layer { display: none; }
  #home { padding: 7rem 1.5rem 3rem; }
  .hero-name { font-size: clamp(2.8rem, 12vw, 4rem); }
  .hero-tagline { font-size: 0.95rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 200px; text-align: center; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo-wrap { max-width: 100%; }
  .about-photo { height: 320px; }
  section { padding: 4rem 1.2rem; }
  .section-title { margin-bottom: 2rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .links-row { flex-direction: column; }
  .link-card { width: 100%; justify-content: center; }
}
