*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #020617; color: #fff; line-height: 1.6; }

/* Nav */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; background: rgba(2,6,23,0.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: #fff; text-decoration: none; }
.nav-logo svg { color: #f97316; }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a { color: #94a3b8; text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: #f97316; }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; background: radial-gradient(ellipse at 20% 50%, rgba(249,115,22,0.08) 0%, transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(245,158,11,0.06) 0%, transparent 60%), #020617; overflow: hidden; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px); background-size: 64px 64px; }
.hero-blob1 { position: absolute; top: 25%; left: 25%; width: 400px; height: 400px; background: rgba(249,115,22,0.08); border-radius: 50%; filter: blur(80px); animation: pulse 4s ease-in-out infinite; }
.hero-blob2 { position: absolute; bottom: 25%; right: 25%; width: 320px; height: 320px; background: rgba(245,158,11,0.06); border-radius: 50%; filter: blur(80px); animation: pulse 4s ease-in-out infinite 1s; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.hero-inner { position: relative; z-index: 10; text-align: center; padding: 0 24px; max-width: 860px; animation: fadeUp 0.8s ease forwards; }
@keyframes fadeUp { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; background: rgba(249,115,22,0.1); border: 1px solid rgba(249,115,22,0.2); color: #fb923c; font-size: 0.85rem; font-weight: 500; margin-bottom: 28px; }
.hero-name { font-size: clamp(3rem, 10vw, 6rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 16px; }
.hero-name .gradient { background: linear-gradient(135deg, #fb923c, #fbbf24, #f97316); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: block; }
.hero-subtitle { font-size: 1.3rem; color: #94a3b8; font-weight: 300; margin-bottom: 12px; }
.hero-desc { color: #64748b; margin-bottom: 40px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.btn-primary { padding: 12px 32px; background: linear-gradient(135deg, #f97316, #f59e0b); color: #fff; font-weight: 600; border-radius: 10px; text-decoration: none; border: none; cursor: pointer; transition: opacity 0.2s, transform 0.2s; font-size: 1rem; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline { padding: 12px 32px; background: rgba(255,255,255,0.05); color: #fff; font-weight: 500; border-radius: 10px; text-decoration: none; border: 1px solid rgba(255,255,255,0.1); cursor: pointer; transition: background 0.2s; font-size: 1rem; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.scroll-ind { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); animation: bounce 1.5s infinite; }
.scroll-ind svg { color: #475569; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* Sections */
section { padding: 96px 24px; }
.section-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #f97316; display: block; margin-bottom: 14px; }
.section-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: #fff; margin-bottom: 16px; line-height: 1.15; }
.section-title .gradient { background: linear-gradient(135deg, #fb923c, #fbbf24); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-sub { color: #64748b; max-width: 520px; }
.container { max-width: 1200px; margin: 0 auto; }
.text-center { text-align: center; }
.text-center .section-sub { margin-left: auto; margin-right: auto; }

/* About */
#about { background: #020617; }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media(min-width:1024px){ .about-grid{grid-template-columns:1fr 1fr} }
.about-text p { color: #94a3b8; margin-bottom: 20px; }
.about-badges { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.about-badge { display: flex; align-items: center; gap: 6px; color: #94a3b8; font-size: 0.9rem; }
.about-badge svg { color: #f97316; flex-shrink: 0; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stat-card { background: linear-gradient(135deg, #0f172a, #0f172a80); border: 1px solid #1e293b; border-radius: 16px; padding: 28px; text-align: center; }
.stat-value { font-size: 2.5rem; font-weight: 800; background: linear-gradient(135deg, #fb923c, #fbbf24); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 4px; }
.stat-label { color: #64748b; font-size: 0.85rem; }

/* Projects */
#projects { background: rgba(15,23,42,0.5); }
.projects-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media(min-width:640px){ .projects-grid{grid-template-columns:1fr 1fr} }
@media(min-width:1024px){ .projects-grid{grid-template-columns:1fr 1fr 1fr} }
.project-card { background: linear-gradient(135deg, #0f172a, #0f172a80); border: 1px solid #1e293b; border-radius: 20px; overflow: hidden; transition: border-color 0.3s, transform 0.3s; }
.project-card:hover { border-color: rgba(249,115,22,0.3); transform: translateY(-4px); }
.project-thumb { height: 180px; background: linear-gradient(135deg, #1e293b, #0f172a); display: flex; align-items: center; justify-content: center; font-size: 4rem; }
.project-body { padding: 24px; }
.project-featured { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #fb923c; background: rgba(249,115,22,0.1); border: 1px solid rgba(249,115,22,0.2); border-radius: 6px; padding: 3px 10px; margin-bottom: 12px; }
.project-title { font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.project-desc { color: #94a3b8; font-size: 0.88rem; margin-bottom: 16px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.tag { padding: 4px 12px; background: #1e293b; color: #cbd5e1; font-size: 0.75rem; border-radius: 999px; }
.project-links { display: flex; gap: 16px; padding-top: 16px; border-top: 1px solid #1e293b; }
.project-link { display: flex; align-items: center; gap: 6px; color: #94a3b8; font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.project-link:hover { color: #fff; }

/* Architecture diagram */
.arch-section { background: #0f172a; border: 1px solid #1e293b; border-radius: 20px; padding: 32px; margin-top: 48px; }
.arch-title { color: #fb923c; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; }
.arch-h { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.arch-p { color: #94a3b8; font-size: 0.9rem; margin-bottom: 32px; }
.arch-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.arch-step { text-align: center; }
.arch-icon { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 1.6rem; }
.arch-icon.s3 { background: rgba(249,115,22,0.15); border: 1px solid rgba(249,115,22,0.3); }
.arch-icon.apigw { background: rgba(168,85,247,0.15); border: 1px solid rgba(168,85,247,0.3); }
.arch-icon.lambda { background: rgba(234,179,8,0.15); border: 1px solid rgba(234,179,8,0.3); }
.arch-icon.ses { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3); }
.arch-step-name { font-size: 0.75rem; font-weight: 600; color: #cbd5e1; }
.arch-step-sub { font-size: 0.68rem; color: #64748b; }
.arch-arrow { color: #334155; font-size: 1.4rem; margin: 0 4px; padding-bottom: 24px; }

/* Experience */
#experience { background: #020617; }
.timeline { position: relative; }
.timeline::before { content:''; position:absolute; left:16px; top:0; bottom:0; width:2px; background:linear-gradient(to bottom,#f97316,#f59e0b,#1e293b); }
@media(min-width:768px){ .timeline::before{left:50%;transform:translateX(-50%)} }
.timeline-item { position: relative; padding-left: 48px; margin-bottom: 48px; }
@media(min-width:768px){ .timeline-item{padding-left:0; display:grid; grid-template-columns:1fr 40px 1fr; gap:0 0; align-items:start; margin-bottom:64px;} .timeline-item:nth-child(odd) .tl-card{grid-column:1;margin-right:36px;text-align:right} .timeline-item:nth-child(even) .tl-card{grid-column:3;margin-left:36px;} .timeline-item:nth-child(odd) .tl-dot{grid-column:2;grid-row:1} .timeline-item:nth-child(even) .tl-dot{grid-column:2;grid-row:1} .timeline-item:nth-child(even)>.tl-card{order:2} }
.tl-dot { width: 16px; height: 16px; background: #f97316; border: 3px solid #020617; border-radius: 50%; position: absolute; left: 9px; top: 20px; }
@media(min-width:768px){ .tl-dot{position:relative;left:auto;top:auto;margin:20px auto 0} }
.tl-card { background: linear-gradient(135deg, #0f172a, #0f172a80); border: 1px solid #1e293b; border-radius: 20px; padding: 24px; }
.tl-period { color: #f97316; font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; }
.tl-title { font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.tl-company { color: #64748b; margin-bottom: 16px; font-size: 0.9rem; }
.tl-list { list-style: none; }
.tl-list li { color: #94a3b8; font-size: 0.88rem; margin-bottom: 6px; display: flex; gap: 8px; }
@media(min-width:768px){ .timeline-item:nth-child(odd) .tl-list li{flex-direction:row-reverse} .timeline-item:nth-child(odd) .tl-list li::before{content:none} }
.tl-list li::before { content: '•'; color: #f97316; flex-shrink: 0; margin-top: 2px; }

/* Skills */
#skills { background: rgba(15,23,42,0.5); }
.certs-grid { display: grid; gap: 20px; grid-template-columns: 1fr; margin-bottom: 48px; }
@media(min-width:768px){ .certs-grid{grid-template-columns:repeat(3,1fr)} }
.cert-card { border-radius: 20px; padding: 24px; position: relative; overflow: hidden; }
.cert-card.aws { background: linear-gradient(135deg, rgba(249,115,22,0.15), rgba(245,158,11,0.08)); border: 1px solid rgba(249,115,22,0.25); }
.cert-card.other { background: linear-gradient(135deg, #0f172a, #0f172a80); border: 1px solid #1e293b; }
.cert-badge { position: absolute; top: 0; right: 0; padding: 4px 12px; background: #f97316; color: #fff; font-size: 0.7rem; font-weight: 700; border-bottom-left-radius: 10px; }
.cert-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 1.4rem; }
.cert-icon.aws-bg { background: rgba(249,115,22,0.2); }
.cert-icon.other-bg { background: #1e293b; }
.cert-name { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.cert-issuer { color: #94a3b8; font-size: 0.85rem; margin-bottom: 4px; }
.cert-date { color: #475569; font-size: 0.75rem; }
.skills-grid { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media(min-width:1024px){ .skills-grid{grid-template-columns:repeat(4,1fr)} }
.skill-card { background: linear-gradient(135deg, #0f172a, #0f172a80); border: 1px solid #1e293b; border-radius: 20px; padding: 24px; }
.skill-icon { width: 44px; height: 44px; background: rgba(249,115,22,0.1); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-size: 1.2rem; }
.skill-title { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.skill-list { list-style: none; }
.skill-list li { color: #94a3b8; font-size: 0.82rem; margin-bottom: 6px; display: flex; gap: 6px; align-items: flex-start; }
.skill-list li::before { content: '•'; color: #f97316; flex-shrink: 0; }

/* Contact */
#contact { background: #020617; }
.contact-card { background: linear-gradient(135deg, #0f172a, #0f172a80); border: 1px solid #1e293b; border-radius: 24px; padding: 48px 32px; max-width: 800px; margin: 0 auto; }
.contact-grid { display: grid; gap: 32px; }
@media(min-width:768px){ .contact-grid{grid-template-columns:1fr 1fr;align-items:center} }
.contact-item { display: flex; align-items: center; gap: 14px; text-decoration: none; transition: opacity 0.2s; }
.contact-item:hover { opacity: 0.8; }
.contact-ic { width: 44px; height: 44px; background: rgba(249,115,22,0.1); border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; }
.contact-ic:hover { background: rgba(249,115,22,0.2); }
.contact-label { color: #64748b; font-size: 0.78rem; margin-bottom: 2px; }
.contact-value { color: #fff; font-size: 0.95rem; }
.contact-socials { display: flex; gap: 10px; margin-top: 16px; }
.social-btn { width: 44px; height: 44px; background: #1e293b; border-radius: 14px; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: background 0.2s; font-size: 1.1rem; }
.social-btn:hover { background: #334155; }
.contact-cta { background: linear-gradient(135deg, rgba(249,115,22,0.1), rgba(245,158,11,0.08)); border: 1px solid rgba(249,115,22,0.2); border-radius: 16px; padding: 28px; }
.contact-cta p { color: #94a3b8; margin-bottom: 16px; font-size: 0.9rem; }

/* Footer */
footer { padding: 28px 24px; background: #020617; border-top: 1px solid #0f172a; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; max-width: 100%; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; font-size: 0.95rem; }
.footer-copy { color: #334155; font-size: 0.8rem; }

/* Nav toggle for mobile */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: #94a3b8; }
@media(max-width:640px){ .nav-links{display:none;position:absolute;top:100%;left:0;right:0;background:#020617;flex-direction:column;padding:16px 24px;border-bottom:1px solid #0f172a} .nav-links.open{display:flex} .nav-toggle{display:block} }

/* Contact form */
.contact-form { margin-top: 32px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; color: #94a3b8; font-size: 0.85rem; margin-bottom: 6px; }
.form-input { width: 100%; padding: 10px 14px; background: #0f172a; border: 1px solid #1e293b; border-radius: 10px; color: #fff; font-size: 0.9rem; outline: none; transition: border-color 0.2s; }
.form-input:focus { border-color: #f97316; }
textarea.form-input { resize: vertical; min-height: 120px; }
.form-status { margin-top: 10px; font-size: 0.85rem; padding: 8px 12px; border-radius: 8px; }
.form-status.success { background: rgba(34,197,94,0.1); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.form-status.error { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }

/* Clickable project card */
.project-card-link { text-decoration: none; color: inherit; display: block; }

/* ============================================================
   Project Detail Page
   ============================================================ */

/* Breadcrumb */
.breadcrumb { padding: 100px 24px 0; max-width: 1200px; margin: 0 auto; }
.breadcrumb a { color: #f97316; text-decoration: none; font-size: 0.88rem; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #475569; font-size: 0.88rem; margin: 0 8px; }
.breadcrumb .current { color: #94a3b8; font-size: 0.88rem; }

/* Project hero */
.proj-hero { padding: 40px 24px 80px; }
.proj-hero-inner { max-width: 1200px; margin: 0 auto; }
.proj-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.proj-badge { padding: 5px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.proj-badge.orange { background: rgba(249,115,22,0.12); border: 1px solid rgba(249,115,22,0.25); color: #fb923c; }
.proj-badge.blue { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.25); color: #60a5fa; }
.proj-badge.green { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.25); color: #4ade80; }
.proj-badge.purple { background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.25); color: #c084fc; }
.proj-title { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; color: #fff; margin-bottom: 16px; line-height: 1.15; }
.proj-summary { color: #94a3b8; font-size: 1.05rem; max-width: 760px; line-height: 1.7; }

/* Detail sections */
.detail-section { padding: 64px 24px; }
.detail-section.alt { background: rgba(15,23,42,0.5); }
.detail-inner { max-width: 1200px; margin: 0 auto; }

/* Two-col layout for some sections */
.detail-two-col { display: grid; gap: 48px; grid-template-columns: 1fr; }
@media(min-width:1024px){ .detail-two-col{ grid-template-columns: 1fr 1fr; } }

/* Services grid */
.services-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media(min-width:768px){ .services-grid{ grid-template-columns: repeat(3,1fr); } }
@media(min-width:1024px){ .services-grid{ grid-template-columns: repeat(4,1fr); } }
.service-card { background: linear-gradient(135deg, #0f172a, #0f172a80); border: 1px solid #1e293b; border-radius: 16px; padding: 20px 16px; }
.service-icon { font-size: 1.6rem; margin-bottom: 10px; }
.service-name { font-size: 0.9rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.service-desc { font-size: 0.78rem; color: #64748b; }

/* Bullet list styled */
.detail-list { list-style: none; }
.detail-list li { color: #94a3b8; font-size: 0.92rem; margin-bottom: 10px; display: flex; gap: 10px; align-items: flex-start; line-height: 1.6; }
.detail-list li::before { content: '▹'; color: #f97316; flex-shrink: 0; margin-top: 2px; }

/* Two-column bullet lists */
.detail-list-2col { display: grid; grid-template-columns: 1fr; gap: 0; }
@media(min-width:640px){ .detail-list-2col{ grid-template-columns: 1fr 1fr; column-gap: 32px; } }

/* CI/CD flow */
.cicd-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 24px; }
.cicd-step { background: #0f172a; border: 1px solid #1e293b; border-radius: 10px; padding: 8px 16px; color: #cbd5e1; font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.cicd-arrow { color: #f97316; font-size: 1rem; }

/* Issue/challenge cards */
.issue-card { background: linear-gradient(135deg, #0f172a, #0f172a80); border: 1px solid #1e293b; border-radius: 16px; padding: 24px; margin-bottom: 16px; }
.issue-card:last-child { margin-bottom: 0; }
.issue-row { display: flex; gap: 10px; margin-bottom: 6px; align-items: baseline; }
.issue-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 4px; flex-shrink: 0; }
.issue-label.problem { background: rgba(239,68,68,0.15); color: #f87171; }
.issue-label.cause { background: rgba(245,158,11,0.15); color: #fbbf24; }
.issue-label.fix { background: rgba(34,197,94,0.15); color: #4ade80; }
.issue-label.lesson { background: rgba(59,130,246,0.15); color: #60a5fa; }
.issue-text { color: #94a3b8; font-size: 0.9rem; line-height: 1.6; }

/* Repo card */
.repo-card { display: inline-flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #0f172a, #0f172a80); border: 1px solid rgba(249,115,22,0.2); border-radius: 14px; padding: 16px 24px; text-decoration: none; transition: border-color 0.2s, transform 0.2s; margin-top: 24px; }
.repo-card:hover { border-color: rgba(249,115,22,0.5); transform: translateY(-2px); }
.repo-card-icon { font-size: 1.4rem; }
.repo-card-label { color: #64748b; font-size: 0.75rem; margin-bottom: 2px; }
.repo-card-name { color: #fff; font-size: 0.95rem; font-weight: 600; }

/* Extended arch flow for more steps */
.arch-flow-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.arch-flow-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.arch-flow-up { font-size: 0.7rem; color: #64748b; text-align: center; }

/* Learned callout */
.learned-card { background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(245,158,11,0.05)); border: 1px solid rgba(249,115,22,0.15); border-radius: 20px; padding: 32px; }
.learned-card p { color: #94a3b8; font-size: 0.95rem; line-height: 1.8; }
