/* This stylesheet defines the visual design for the Traffic Sign AI portfolio website. */
:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8faff;
    --text: #172033;
    --muted: #68758b;
    --line: #e4e9f2;
    --blue: #4f67f6;
    --blue-dark: #3347d9;
    --green: #18a875;
    --shadow: 0 16px 50px rgba(25, 42, 83, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.page-shell { max-width: 1240px; margin: 0 auto; padding: 0 34px; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(219, 226, 239, .8); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 600; letter-spacing: -.03em; }
.brand strong { color: var(--blue); }
.top-nav { display: flex; align-items: center; gap: 30px; color: #536078; font-size: 13px; }
.top-nav a:hover, .footer a:hover { color: var(--blue); }
.nav-cta { padding: 10px 15px; border: 1px solid #dfe5f1; background: white; border-radius: 10px; color: var(--text) !important; font-weight: 650; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 50px; padding: 70px 0 48px; }
.eyebrow { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .16em; margin-bottom: 17px; }
.hero h1 { margin: 0; font-size: clamp(39px, 4.5vw, 61px); line-height: 1.08; letter-spacing: -.065em; font-weight: 750; }
.hero h1 span { color: var(--blue); }
.hero-description { max-width: 510px; margin: 22px 0 27px; color: var(--muted); font-size: 16px; line-height: 1.8; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 15px; min-height: 45px; padding: 0 18px; border: 0; border-radius: 11px; cursor: pointer; font-size: 13px; font-weight: 700; transition: transform .18s, box-shadow .18s, background .18s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { background: var(--blue); color: white; box-shadow: 0 8px 18px rgba(79, 103, 246, .2); }
.button-primary:hover { background: var(--blue-dark); box-shadow: 0 10px 23px rgba(79, 103, 246, .28); }
.button-secondary { background: white; border: 1px solid var(--line); color: var(--text); }
.hero-visual { position: relative; min-height: 360px; display: grid; place-items: center; }
.visual-glow { position: absolute; width: 340px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(93, 112, 255, .17), rgba(93, 112, 255, 0) 70%); }
.visual-card { position: absolute; border: 1px solid rgba(224, 230, 243, .9); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); overflow: hidden; }
.visual-card-back { width: 250px; right: 0; top: 24px; padding: 17px; z-index: 1; transform: rotate(3deg); }
.mini-label { font-size: 9px; letter-spacing: .14em; font-weight: 800; color: #8792a7; }
.pipeline-line { display: flex; align-items: center; gap: 10px; margin-top: 15px; }
.pipeline-line > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #eef1ff; color: var(--blue); font-size: 10px; font-weight: 800; }
.pipeline-line div { flex: 1; display: flex; flex-direction: column; font-size: 11px; }
.pipeline-line small { color: var(--muted); font-size: 10px; }
.pipeline-line b { color: var(--green); font-size: 13px; }
.visual-card-front { width: min(100%, 360px); left: 5px; bottom: 12px; z-index: 2; transform: rotate(-2deg); }
.road-art { position: relative; height: 230px; overflow: hidden; background: linear-gradient(180deg, #dfe8ff 0%, #f6f8ff 65%, #dcebe4 66%, #b9d8c8 100%); }
.road-sky { position: absolute; width: 70px; height: 70px; border-radius: 50%; background: rgba(255,255,255,.72); right: 35px; top: 28px; }
.road-hill { position: absolute; bottom: 53px; width: 230px; height: 90px; border-radius: 50% 50% 0 0; }
.hill-one { left: -55px; background: #bed8cf; transform: rotate(-10deg); }
.hill-two { right: -75px; background: #a9c9bf; transform: rotate(10deg); }
.road-shape { position: absolute; bottom: -30px; left: 95px; width: 170px; height: 180px; background: #596477; clip-path: polygon(35% 0, 65% 0, 100% 100%, 0 100%); }
.road-dash { position: absolute; bottom: 0; left: 176px; width: 7px; height: 76px; background: repeating-linear-gradient(to bottom, white 0 15px, transparent 15px 28px); }
.sign-post { position: absolute; top: 79px; left: 92px; width: 5px; height: 95px; background: #64748b; }
.sign-face { position: absolute; top: 44px; left: 62px; width: 65px; height: 65px; display: grid; place-items: center; background: #fff; border: 7px solid #e45154; border-radius: 12px; transform: rotate(45deg); box-shadow: 0 5px 12px rgba(22, 32, 51, .15); }
.sign-face span { color: #e45154; font-size: 31px; font-weight: 800; transform: rotate(-45deg); }
.detection-frame { position: absolute; top: 33px; left: 52px; width: 86px; height: 86px; border: 1.5px solid #18a875; border-radius: 3px; }
.detection-frame span { position: absolute; top: -17px; left: -1px; background: #18a875; color: white; font-size: 7px; font-weight: 800; padding: 3px 5px; white-space: nowrap; }
.visual-card-footer { display: flex; justify-content: space-between; padding: 11px 14px; color: #78849a; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.visual-card-footer i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-right: 5px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 90px; }
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.75); }
.stat-number { font-size: 23px; font-weight: 760; letter-spacing: -.05em; }
.stat-label { color: var(--muted); font-size: 11px; }
.section-block { margin: 0 0 92px; scroll-margin-top: 25px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 25px; }
.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading h2, .about-copy h2 { margin: 0; font-size: clamp(27px, 3vw, 36px); line-height: 1.18; letter-spacing: -.05em; }
.section-heading > p { max-width: 380px; margin: 0 0 3px; color: var(--muted); font-size: 13px; }
.demo-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 17px; align-items: stretch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; padding: 23px; box-shadow: 0 8px 28px rgba(25, 42, 83, .035); min-width: 0; }
.panel-title { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 21px; }
.panel-title h3 { margin: 1px 0 4px; font-size: 15px; letter-spacing: -.02em; }
.panel-title p { margin: 0; color: var(--muted); font-size: 11px; }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 235px; padding: 20px; border: 1.5px dashed #cbd4e7; border-radius: 13px; background: var(--surface-soft); text-align: center; cursor: pointer; transition: border .2s, background .2s; }
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--blue); background: #f0f3ff; }
.drop-zone input { display: none; }
.upload-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 12px; border-radius: 13px; background: #e9edff; color: var(--blue); font-size: 24px; font-weight: 400; }
.drop-zone strong { font-size: 13px; }
.drop-subtitle { margin-top: 4px; color: var(--muted); font-size: 11px; }
.browse-button { margin-top: 15px; padding: 8px 13px; border: 1px solid #dfe5f1; border-radius: 8px; background: white; font-size: 11px; font-weight: 700; }
.selected-file { margin-top: 11px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.full-width { width: 100%; margin-top: 14px; }
.privacy-note { margin: 14px 0 0; color: #7c879b; font-size: 10px; text-align: center; }
.privacy-note span { color: var(--green); font-size: 8px; margin-right: 4px; }
.result-placeholder, .loading-state { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; border-radius: 12px; background: #f8faff; border: 1px solid #edf0f7; }
.placeholder-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: #edf0ff; color: var(--blue); font-size: 28px; }
.result-placeholder strong, .loading-state strong { font-size: 13px; }
.result-placeholder span, .loading-state span { max-width: 240px; color: var(--muted); font-size: 11px; }
.result-placeholder[hidden], .loading-state[hidden], .result-content[hidden], .error-message[hidden] { display: none; }
.spinner { width: 31px; height: 31px; border: 3px solid #e4e9ff; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-message { padding: 14px; border-radius: 10px; color: #9d3434; background: #fff1f1; border: 1px solid #f7d6d6; font-size: 12px; }
.result-content img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: #f4f6fb; border: 1px solid var(--line); border-radius: 11px; }
.result-summary { display: flex; justify-content: space-between; gap: 10px; margin: 13px 0; padding: 12px; background: #f5f7ff; border-radius: 10px; font-size: 11px; font-weight: 700; }
.prediction-list { display: grid; gap: 9px; }
.prediction-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.prediction-name { font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.prediction-meta { margin-top: 4px; color: var(--muted); font-size: 10px; }
.prediction-chip { flex-shrink: 0; padding: 5px 7px; border-radius: 7px; color: #14734f; background: #e9f8f1; font-size: 10px; font-weight: 800; }
.setup-alert { margin-bottom: 18px; padding: 16px; border: 1px solid #f0d7a6; border-radius: 12px; background: #fff9ed; color: #7b5620; font-size: 12px; }
.setup-alert p { margin: 7px 0 0; overflow-wrap: anywhere; }
.setup-alert code { font-size: 11px; }
.pipeline-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pipeline-card { padding: 23px; background: white; border: 1px solid var(--line); border-radius: 15px; }
.pipeline-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 22px 0 17px; border-radius: 13px; background: #eef1ff; color: var(--blue); font-size: 23px; }
.pipeline-card h3 { margin: 0 0 8px; font-size: 15px; }
.pipeline-card p { min-height: 82px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.about-section { display: grid; grid-template-columns: 1fr .9fr; gap: 60px; align-items: center; }
.about-copy .eyebrow { margin-bottom: 12px; }
.about-copy p { color: var(--muted); font-size: 13px; line-height: 1.85; }
.tech-panel { padding: 23px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.tech-panel h3 { margin: 0 0 16px; font-size: 14px; }
.tech-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid #edf0f6; font-size: 11px; }
.tech-row span { color: var(--muted); }
.tech-row strong { text-align: right; font-size: 11px; }
.limitations-note { display: flex; gap: 13px; padding: 17px 19px; margin-bottom: 48px; border: 1px solid #dfe5fb; border-radius: 13px; background: #f0f3ff; }
.note-icon { display: grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: #dfe5ff; color: var(--blue); font-size: 12px; font-weight: 800; }
.limitations-note strong { font-size: 11px; }
.limitations-note p { margin: 4px 0 0; color: #63708b; font-size: 11px; line-height: 1.7; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.footer-brand { color: var(--text); font-size: 12px; }
.github-section { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; border: 1px solid #a9cce4; border-left: 5px solid var(--blue); border-radius: 15px; background: linear-gradient(115deg, #edf7fd, #ffffff 75%); box-shadow: 0 9px 25px rgba(52, 121, 178, .1); }
.github-eyebrow { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.github-copy h2 { margin: 5px 0 7px; font-size: 21px; letter-spacing: -.035em; }
.github-copy p { max-width: 680px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.github-link { display: inline-flex; align-items: center; justify-content: center; gap: 9px; flex-shrink: 0; padding: 13px 17px; border: 1px solid var(--blue); border-radius: 9px; background: var(--blue); color: #fff; box-shadow: 0 7px 16px rgba(52, 121, 178, .2); font-size: 11px; font-weight: 800; transition: background .18s, border-color .18s, transform .18s; }
.github-link:hover { transform: translateY(-1px); border-color: var(--blue-dark); background: var(--blue-dark); }
@media (max-width: 850px) {
    .page-shell { padding: 0 22px; }
    .hero { grid-template-columns: 1fr; gap: 10px; padding-top: 55px; }
    .hero-visual { min-height: 360px; max-width: 500px; width: 100%; margin: 0 auto; }
    .stats-row { grid-template-columns: repeat(2, 1fr); margin-bottom: 65px; }
    .demo-grid, .about-section { grid-template-columns: 1fr; }
    .pipeline-grid { grid-template-columns: 1fr; }
    .pipeline-card p { min-height: 0; }
    .about-section { gap: 25px; }
}
@media (max-width: 560px) {
    .page-shell { padding: 0 15px; }
    .topbar { height: 70px; }
    .top-nav { gap: 12px; }
    .top-nav > a:not(.nav-cta) { display: none; }
    .nav-cta { padding: 8px 10px; }
    .hero { padding-top: 42px; }
    .hero h1 { font-size: 40px; }
    .hero-description { font-size: 14px; }
    .hero-visual { min-height: 315px; }
    .visual-card-front { width: 88%; left: 0; }
    .visual-card-back { width: 220px; right: 0; }
    .road-art { height: 200px; }
    .stats-row { gap: 8px; }
    .stat-card { padding: 16px; }
    .stat-number { font-size: 20px; }
    .section-heading { display: block; }
    .section-heading > p { margin-top: 12px; }
    .panel { padding: 16px; }
    .footer { flex-wrap: wrap; }
    .footer > span { order: 3; width: 100%; }
}

/* This section gives the first screen a more mature engineering layout and puts the demo within immediate reach. */
.hero {
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
    align-items: start;
    gap: clamp(34px, 5vw, 68px);
    padding: 62px 0 54px;
}
.hero-copy { min-width: 0; }
.hero h1 { max-width: 600px; font-size: clamp(39px, 4.15vw, 56px); letter-spacing: -.055em; }
.hero h1 span { color: #3675b9; }
.hero-description { max-width: 470px; margin: 17px 0 21px; font-size: 14px; line-height: 1.75; }
.hero-actions { margin-top: 0; }
.hero-upload-panel { margin-top: 23px; padding: 20px; border-color: #dce6ef; box-shadow: 0 12px 34px rgba(32, 68, 103, .07); }
.hero-upload-panel .panel-title { margin-bottom: 15px; }
.hero-drop-zone { min-height: 156px; border-color: #bfd1df; background: #f8fbfd; }
.hero-drop-zone:hover, .hero-drop-zone.drag-over { border-color: #4788bc; background: #f0f7fc; }
.hero-drop-zone .upload-icon { color: #3477ad; background: #e5f0f8; }
.upload-actions { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
.upload-actions .selected-file { flex: 1; margin: 0; min-width: 0; }
.analyze-hero-button { flex: 1; min-height: 42px; gap: 9px; padding: 0 13px; font-size: 11px; white-space: nowrap; background: #3479b2; box-shadow: 0 7px 16px rgba(52, 121, 178, .16); }
.analyze-hero-button:hover { background: #28689e; }
.hero-upload-panel .privacy-note { font-size: 9px; }
.sample-section { margin: 0 0 14px; padding: 0; border: 0; }
.sample-heading { display: block; }
.sample-heading strong { font-size: 11px; }
.sample-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 9px; }
.sample-option { display: block; min-width: 0; padding: 0; overflow: hidden; border: 1px solid #dce5ed; border-radius: 10px; background: #fff; color: var(--text); text-align: left; cursor: pointer; transition: border-color .18s, box-shadow .18s, transform .18s; }
.sample-option:hover { transform: translateY(-1px); border-color: #9dbbd2; box-shadow: 0 5px 14px rgba(34, 75, 108, .09); }
.sample-option:disabled { opacity: .6; cursor: wait; transform: none; }
.sample-option img { display: block; width: 100%; aspect-ratio: 1.85 / 1; object-fit: cover; background: #edf2f5; }
.sample-option-footer { display: flex; flex-direction: column; gap: 3px; padding: 7px 9px 8px; }
.sample-option-footer strong { overflow: hidden; font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.sample-option-footer > span { color: #3479b2; font-size: 8px; font-weight: 750; }

/* This section restores three traffic sign examples and keeps their panels compact across screen sizes. */
.hero-visual { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; min-height: 0; padding-top: 4px; }
.vision-card { overflow: hidden; border: 1px solid #dce5ed; border-radius: 13px; background: #fff; box-shadow: 0 7px 18px rgba(28, 57, 82, .05); }
.vision-image { height: clamp(92px, 10vw, 124px); background-image: url("traffic-vision-triptych.png"); background-repeat: no-repeat; background-size: 100% auto; background-color: #e8edf1; }
.scene-image { background-position: center 8%; }
.detection-image { background-position: center 50%; }
.classification-image { background-position: center 92%; }
.vision-caption { display: flex; align-items: center; gap: 9px; min-height: 47px; padding: 7px 10px; }
.vision-caption > div { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.vision-caption strong { font-size: 10px; line-height: 1.35; }
.vision-caption small { color: #778899; font-size: 8px; }
.vision-state { padding: 4px 6px; border: 1px solid #e4ebf1; border-radius: 6px; color: #6b8294; font-size: 7px; font-weight: 800; letter-spacing: .08em; }

/* This section keeps the remaining project facts and demo results aligned with the updated light blue palette. */
:root { --bg: #f5f8fb; --surface-soft: #f8fbfd; --blue: #3479b2; --blue-dark: #28689e; --line: #dfe7ee; }
.stats-row { margin-bottom: 76px; }
.stat-card { border-color: #e0e8ef; }
.demo-grid.results-grid { grid-template-columns: 1fr; }
.result-panel { max-width: 920px; }
.footer-disclaimer { max-width: 590px; color: #748292; font-size: 9px; line-height: 1.65; }

/* This section adapts the image cards, upload controls and navigation to tablet and phone widths. */
@media (max-width: 850px) {
    .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; }
    .hero-copy { max-width: 650px; }
    .hero-visual { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 650px; margin: 0; gap: 9px; }
    .vision-image { height: 84px; }
    .vision-caption { flex-wrap: wrap; align-items: flex-start; gap: 6px; }
    .vision-caption > div { flex-basis: 100%; }
}
@media (max-width: 560px) {
    .hero { padding-top: 38px; }
    .hero h1 { font-size: 39px; }
    .hero-description { font-size: 13px; }
    .hero-upload-panel { padding: 16px; }
    .hero-drop-zone { min-height: 145px; }
    .upload-actions { flex-wrap: wrap; }
    .upload-actions .selected-file { flex-basis: 100%; }
    .analyze-hero-button { flex: 1.4; }
    .hero-visual { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .vision-image { height: 62px; }
    .vision-caption { display: block; min-height: 34px; padding: 6px 6px 7px; }
    .vision-caption small, .vision-state { display: none; }
    .vision-caption > div { display: block; }
    .vision-caption strong { display: block; font-size: 8px; line-height: 1.3; }
    .sample-grid { gap: 7px; }
    .sample-option-footer { padding: 6px 7px; }
    .sample-option-footer strong { font-size: 8px; }
    .sample-option-footer > span { font-size: 7px; }
    .stats-row { margin-bottom: 58px; }
    .github-section { align-items: flex-start; flex-direction: column; padding: 20px; }
    .github-link { width: 100%; }
}

/* This section lays out all five project facts evenly and keeps the cards readable on smaller screens. */
.stats-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 850px) {
    .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
