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

:root {
  --bg: #07111f;
  --bg-soft: #0c1728;
  --card: rgba(15, 31, 51, 0.78);
  --text: #f8fafc;
  --muted: #a9b8cb;
  --accent: #38bdf8;
  --accent-2: #22d3ee;
  --line: rgba(148, 163, 184, 0.16);
}

html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 15% 15%, rgba(56,189,248,.09), transparent 28%), radial-gradient(circle at 85% 70%, rgba(34,211,238,.07), transparent 30%);
  z-index: -2;
}
.background-grid {
  position: fixed; inset: 0; pointer-events: none; opacity: .16; z-index: -1;
  background-image: linear-gradient(rgba(148,163,184,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.12) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

a { color: inherit; }
.container { width: min(1100px, calc(100% - 40px)); margin: auto; }

/* Navigation */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px max(24px, calc((100% - 1100px) / 2));
  background: rgba(2, 6, 23, .62); backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent; transition: .3s ease;
}
.navbar.scrolled { border-bottom-color: var(--line); background: rgba(2, 6, 23, .9); }
.brand { font-size: 28px; font-weight: 900; text-decoration: none; letter-spacing: -1px; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; color: #dbe7f4; font-size: 14px; font-weight: 600; transition: .25s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.menu-toggle { display: none; border: 0; background: transparent; color: white; font-size: 25px; cursor: pointer; }

/* Hero */
.hero { min-height: 100vh; padding: 130px 20px 60px; display: grid; place-items: center; position: relative; }
.hero-content { width: min(1100px, 100%); display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.eyebrow, .section-label { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 3px; }
.hero h1 { font-size: clamp(52px, 8vw, 88px); line-height: .98; letter-spacing: -4px; margin: 14px 0; }
.hero h1 span, .hero h2 span, section h2 span { color: var(--accent); }
.hero h2 { font-size: clamp(26px, 4vw, 40px); margin-bottom: 16px; }
.hero-description { max-width: 620px; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 10px; text-decoration: none; font-weight: 800; transition: .25s ease; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #04111e; box-shadow: 0 12px 30px rgba(56,189,248,.18); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 35px rgba(56,189,248,.28); background: #67d2fa; }
.btn-outline { border-color: rgba(148,163,184,.35); background: rgba(15,23,42,.45); }
.btn-outline:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }
.hero-tech { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-tech span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: #b9d8e8; font-size: 12px; background: rgba(15,31,51,.5); }

.hero-photo-wrap { min-height: 520px; position: relative; display: grid; place-items: center; }
.photo-glow { position: absolute; width: 390px; height: 390px; border-radius: 50%; background: rgba(56,189,248,.16); filter: blur(45px); animation: pulse 4s ease-in-out infinite; }
.hero-photo { width: min(390px, 78vw); aspect-ratio: 1 / 1; object-fit: cover; object-position: center top; border-radius: 50%; position: relative; z-index: 2; border: 5px solid rgba(56,189,248,.7); box-shadow: 0 0 0 12px rgba(56,189,248,.05), 0 30px 80px rgba(0,0,0,.45); animation: float 5s ease-in-out infinite; }
.orbit { position: absolute; border: 1px solid rgba(56,189,248,.22); border-radius: 50%; transform: rotate(-20deg); }
.orbit-one { width: 470px; height: 300px; animation: spin 12s linear infinite; }
.orbit-two { width: 300px; height: 470px; animation: spin 16s linear infinite reverse; }
.floating-card { position: absolute; z-index: 3; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7,17,31,.82); backdrop-filter: blur(12px); box-shadow: 0 15px 30px rgba(0,0,0,.25); font-size: 13px; font-weight: 800; animation: float 4s ease-in-out infinite; }
.card-cloud { top: 17%; left: 3%; }
.card-docker { right: 2%; top: 34%; animation-delay: 1s; }
.card-cicd { bottom: 13%; left: 12%; animation-delay: 2s; }
.scroll-indicator { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); text-decoration: none; color: #8fa3b8; font-size: 12px; display: flex; gap: 8px; align-items: center; }
.scroll-indicator span { width: 7px; height: 7px; border-right: 1px solid var(--accent); border-bottom: 1px solid var(--accent); transform: rotate(45deg); animation: bounce 1.4s infinite; }

/* Sections */
section { padding: 100px 20px; }
section h2 { font-size: clamp(34px, 5vw, 54px); line-height: 1.1; letter-spacing: -2px; }
.section-title { text-align: center; margin: 10px 0 45px; }
.center { text-align: center; }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; align-items: start; }
.about-text p { color: var(--muted); font-size: 17px; margin-bottom: 18px; }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 28px; }
.stats div { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(15,31,51,.5); }
.stats strong { display: block; font-size: 25px; color: var(--accent); }
.stats span { color: #8fa3b8; font-size: 12px; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.skill { padding: 18px; text-align: center; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, rgba(15,31,51,.9), rgba(10,22,38,.7)); color: #dbeafe; font-weight: 800; transition: .3s ease; }
.skill:hover { transform: translateY(-8px) scale(1.02); border-color: rgba(56,189,248,.65); color: var(--accent); box-shadow: 0 15px 35px rgba(0,0,0,.2); }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.project { position: relative; padding: 30px; min-height: 245px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(15,31,51,.9), rgba(7,17,31,.78)); overflow: hidden; transition: .35s ease; }
.project::after { content: ""; position: absolute; width: 130px; height: 130px; right: -55px; bottom: -55px; border-radius: 50%; background: rgba(56,189,248,.1); transition: .35s; }
.project:hover { transform: translateY(-8px); border-color: rgba(56,189,248,.55); box-shadow: 0 22px 45px rgba(0,0,0,.25); }
.project:hover::after { transform: scale(1.6); }
.project-number { color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: 2px; margin-bottom: 14px; }
.project h3 { font-size: 24px; margin-bottom: 10px; }
.project p { color: var(--muted); margin-bottom: 20px; }
.project-tools { display: flex; flex-wrap: wrap; gap: 7px; }
.project-tools span { font-size: 11px; padding: 5px 8px; border-radius: 999px; background: rgba(56,189,248,.08); color: #9bdcf5; border: 1px solid rgba(56,189,248,.15); }

.resume-card { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 38px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(110deg, rgba(15,31,51,.9), rgba(7,17,31,.75)); }
.resume-card p:not(.section-label) { color: var(--muted); margin-top: 10px; }
.contact-box { text-align: center; padding-bottom: 70px; }
.contact-box h2 { margin: 12px 0; }
.contact-box > p:not(.section-label) { color: var(--muted); }
.contact-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
footer { padding: 30px 20px; text-align: center; background: #020617; color: #7f93a8; border-top: 1px solid var(--line); }
footer p + p { margin-top: 4px; font-size: 12px; }

/* Scroll animations */
.section-reveal { opacity: 0; transform: translateY(35px); transition: opacity .8s ease, transform .8s ease; }
.section-reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse { 0%,100% { transform: scale(.92); opacity: .6; } 50% { transform: scale(1.08); opacity: .95; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes bounce { 0%,100% { transform: rotate(45deg) translate(0,0); } 50% { transform: rotate(45deg) translate(3px,3px); } }
@keyframes blink { 50% { border-color: transparent; } }

@media (max-width: 850px) {
  .nav-links { position: absolute; top: 67px; left: 20px; right: 20px; display: none; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(2,6,23,.96); }
  .nav-links.open { display: flex; }
  .menu-toggle { display: block; }
  .hero-content, .about-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-photo-wrap { min-height: 420px; }
  .about-grid { gap: 35px; }
  .skills { grid-template-columns: repeat(3,1fr); }
  .resume-card { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .container { width: min(100% - 28px, 1100px); }
  section { padding: 75px 14px; }
  .hero { padding-top: 110px; }
  .hero h1 { letter-spacing: -2px; }
  .hero-photo { width: 290px; }
  .orbit-one { width: 340px; height: 220px; }
  .orbit-two { width: 220px; height: 340px; }
  .card-cloud { left: 0; }
  .card-docker { right: 0; }
  .skills { grid-template-columns: repeat(2,1fr); }
  .projects { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .scroll-indicator { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
