/* Carlos Alamilla — personal portal
   Base: charcoal / warm white / electric lime accent. Mobile-first layout. */
:root {
  --black: #090909;
  --charcoal: #141414;
  --charcoal-2: #202020;
  --white: #ffffff;
  --paper: #fff;
  --muted: #a5a5a5;
  --line: #ffffff24;
  --ink: #101010;
  --accent: #ffdc00;
  --accent-dark: #e8c700;
  --font-display: 'Barlow Condensed', Impact, sans-serif;
  --font-body: 'DM Sans', Arial, sans-serif;
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body { margin: 0; color: var(--white); background: var(--black); font-family: var(--font-body); font-size: 15px; line-height: 1.6; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.section-pad { padding: 78px 0; }

/* Fixed navigation */
.site-header { height: 72px; position: sticky; top: 0; z-index: 20; background: #0a0c0ff2; border-bottom: 1px solid #ffffff12; backdrop-filter: blur(14px); }
.nav-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: inline-flex; align-items: baseline; gap: 5px; color: var(--white); font: 800 17px/1 var(--font-display); letter-spacing: 1.1px; }
.wordmark span { font-weight: 600; }
.wordmark i { color: var(--accent); font-style: normal; font-size: 25px; margin-left: -5px; }
.main-nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); color: #d5d9da; font-size: 11px; font-weight: 600; letter-spacing: .3px; }
.main-nav a { transition: color .2s ease; }
.main-nav a:hover, .footer-links a:hover { color: var(--accent); }
.main-nav .nav-contact { color: var(--accent); border: 1px solid #ffdc0075; padding: 9px 13px; }
.nav-contact i { margin-left: 5px; font-size: 9px; }
.menu-toggle { display: none; border: 0; padding: 8px; background: transparent; color: white; font-size: 20px; }

/* Hero */
.hero { height: min(700px, calc(100vh - 72px)); min-height: 560px; position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; }
.hero-bg, .hero-shade { position: absolute; inset: 0; z-index: -2; }
.hero-bg { background: #20272b url('img/carlos02.png') center 46% / cover no-repeat; transform: scale(1.015); animation: hero-reveal 1.2s ease-out both; }
.hero-shade { z-index: -1; background: linear-gradient(90deg, #080a0de8 0%, #080a0dba 42%, #080a0d20 100%), linear-gradient(0deg, #080a0d68 0%, transparent 30%); }
.hero-content { padding-top: 10px; animation: content-rise .8s .12s both; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #d4d9d4; font-size: 10px; font-weight: 700; letter-spacing: 2.1px; line-height: 1.5; text-transform: uppercase; }
.eyebrow > span { display: inline-block; width: 22px; height: 2px; background: var(--accent); }
.hero h1, .about h2, .section-heading h2, .contact h2 { margin: 18px 0; font: 800 clamp(64px, 10.5vw, 126px)/.82 var(--font-display); letter-spacing: -.6px; }
.hero h1 em, .about h2 em, .section-heading h2 em, .contact h2 em { color: var(--accent); font-style: normal; }
.hero-intro { max-width: 390px; margin: 25px 0 24px; color: #c2c7c7; font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 12px; padding: 0 17px; font-size: 10px; font-weight: 700; letter-spacing: .65px; text-transform: uppercase; transition: color .2s, background .2s, transform .2s, border-color .2s; }
.button:hover { transform: translateY(-2px); }
.button-accent { color: var(--black); background: var(--accent); }
.button-accent:hover { background: var(--accent-dark); }
.button-outline { color: var(--white); border: 1px solid #ffffff62; background: transparent; }
.button-outline:hover { color: var(--accent); border-color: var(--accent); }
.hero-side-note { position: absolute; right: 26px; top: 50%; writing-mode: vertical-rl; transform: translateY(-50%); color: #ffffffa8; font-size: 9px; font-weight: 700; letter-spacing: 2px; }
.hero-side-note span { color: var(--accent); padding: 7px 0; }
.scroll-cue { position: absolute; left: max(20px, calc((100% - var(--container))/2)); bottom: 25px; display: flex; align-items: center; gap: 10px; color: #aeb5b6; font-size: 9px; letter-spacing: 1.3px; text-transform: uppercase; }
.scroll-cue span { display: block; width: 28px; height: 1px; background: var(--accent); }

/* About */
.about { color: var(--ink); background: var(--white); }
.about-grid { display: grid; grid-template-columns: .95fr 1fr; align-items: center; gap: clamp(42px, 8vw, 110px); }
.about-image { position: relative; height: 450px; background: #303b3d; }
.about-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.72); }
.about-image:after { content: ''; position: absolute; inset: 15px -15px -15px 15px; border: 1px solid var(--accent); pointer-events: none; }
.image-label { position: absolute; left: 0; bottom: 0; z-index: 1; padding: 10px 14px; color: var(--white); background: var(--black); font-size: 9px; letter-spacing: 1.5px; }
.eyebrow.dark { color: #727a7d; }
.about h2 { margin: 15px 0 20px; color: var(--ink); font-size: clamp(54px, 7vw, 82px); }
.about h2 em { color: #b59d00; }
.about-copy > p:not(.eyebrow) { max-width: 490px; color: #747d80; font-size: 13px; line-height: 1.8; }
.about-copy .about-lead { color: #232a2c !important; font-size: 15px !important; font-weight: 600; }
.under-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 13px; color: #1f2728; font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.under-link i { color: #b59d00; transition: transform .2s; }
.under-link:hover i { transform: translateX(5px); }

/* Social links */
.social { background: var(--charcoal); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-heading h2 { margin: 14px 0 0; font-size: clamp(43px, 6vw, 70px); line-height: .9; }
.section-heading > p { max-width: 290px; margin: 0 0 2px; color: var(--muted); font-size: 12px; }
.social-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.social-card { min-height: 90px; display: flex; align-items: center; gap: 14px; padding: 17px; border: 1px solid #ffffff19; background: #ffffff06; transition: transform .22s, background .22s, border-color .22s; }
.social-card:hover { transform: translateY(-4px); background: #ffffff0c; border-color: #ffdc0077; }
.social-icon { width: 41px; height: 41px; flex: 0 0 41px; display: grid; place-items: center; color: var(--accent); border: 1px solid #ffdc0062; font-size: 17px; }
.facebook-card .social-icon { color: #a6c8ff; border-color: #a6c8ff60; }
.youtube-card .social-icon { color: #ff7878; border-color: #ff787860; }
.social-card-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.social-card-copy b { font-size: 12px; }
.social-card-copy small { overflow: hidden; color: #929b9e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.social-card .external { margin-left: auto; color: #899294; font-size: 10px; }

/* Gallery */
.gallery { color: var(--ink); background: #ffffff; }
.gallery-heading { align-items: end; }
.gallery-heading h2 { color: var(--ink); }
.gallery-heading h2 em { color: #b59d00; }
.gallery-heading .under-link { margin-bottom: 5px; }
.gallery-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: repeat(2, 180px); gap: 10px; }
.gallery-tile { position: relative; overflow: hidden; background: #d1d5d2; }
.gallery-tile.tile-tall { grid-row: span 2; }
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s; filter: saturate(.8); }
.gallery-tile:hover img { transform: scale(1.06); filter: saturate(1); }
.gallery-tile > span { position: absolute; right: 11px; bottom: 11px; display: grid; width: 33px; height: 33px; place-items: center; color: var(--black); background: var(--accent); font-size: 13px; opacity: 0; transform: translateY(5px); transition: .25s; }
.gallery-tile:hover > span { opacity: 1; transform: translateY(0); }

/* YouTube */
.videos { background: var(--black); }
.videos .section-heading { align-items: end; }
.videos .section-heading .button { min-height: 40px; }
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.video-frame, .video-placeholder { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #1c2225; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-placeholder img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.65) saturate(.7); transition: transform .4s; }
.video-placeholder:hover img { transform: scale(1.04); }
.play-button { position: absolute; left: 50%; top: 50%; display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid #ffffffba; border-radius: 50%; color: var(--black); background: var(--accent); transform: translate(-50%, -50%); transition: scale .2s; }
.video-placeholder:hover .play-button { scale: 1.1; }
.placeholder-note { position: absolute; left: 14px; bottom: 12px; color: white; font-size: 9px; letter-spacing: 1.3px; text-transform: uppercase; }
.video-caption { display: flex; flex-direction: column; gap: 3px; padding-top: 12px; }
.video-caption span { color: var(--accent); font-size: 8px; font-weight: 700; letter-spacing: 1.5px; }
.video-caption b { font-size: 12px; }
.embed-note { margin: 18px 0 0; color: #7e898c; font-size: 10px; }
.embed-note code { color: #cbd3d1; }

/* Contact and footer */
.contact { color: var(--ink); background: var(--accent); }
.contact .eyebrow { color: #27230b; }
.contact .eyebrow > span { background: var(--black); }
.contact h2 em { color: var(--white); }
.contact-right p { color: #34300f; }
.contact .button-accent { color: var(--accent); background: var(--black); }
.contact .button-accent:hover { background: #272727; }
.contact-inner { display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.contact h2 { margin: 15px 0 0; font-size: clamp(57px, 8vw, 90px); }
.contact-right { max-width: 370px; }
.contact-right p { margin: 0 0 19px; color: #a8b0b0; font-size: 13px; }
.site-footer { padding: 28px 0 17px; color: #adb5b7; background: #080a0c; }
.footer-main, .footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.footer-main { padding-bottom: 23px; border-bottom: 1px solid #ffffff18; }
.footer-logo { color: var(--white); }
.footer-links { display: flex; flex-wrap: wrap; gap: 19px; font-size: 10px; }
.footer-social { display: flex; gap: 9px; }
.footer-social a { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #ffffff2e; font-size: 13px; transition: color .2s, border-color .2s; }
.footer-social a:hover { color: var(--accent); border-color: var(--accent); }
.footer-bottom { padding-top: 14px; color: #778184; font-size: 9px; }
.footer-bottom a:hover { color: var(--accent); }

@keyframes content-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hero-reveal { from { transform: scale(1.06); } to { transform: scale(1.015); } }

/* Historia: biography and chronological career page */
.history-hero { min-height: 500px; position: relative; isolation: isolate; display: flex; align-items: center; overflow: hidden; background: var(--black); }
.history-hero-image, .history-hero-shade { position: absolute; inset: 0; z-index: -2; }
.history-hero-image { background: url('img/carlos01.png') center 38% / cover no-repeat; filter: grayscale(1); }
.history-hero-shade { z-index: -1; background: linear-gradient(90deg,#080808ed 0%,#080808bd 48%,#08080836 100%),linear-gradient(0deg,#08080895,transparent 42%); }
.history-hero-content { padding-top: 54px; padding-bottom: 62px; }
.history-back { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 36px; color: #dedede; font-size: 10px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }
.history-back:hover { color: var(--accent); }
.history-hero h1 { margin: 18px 0; font: 800 clamp(60px,9vw,104px)/.85 var(--font-display); letter-spacing: -.5px; }
.history-hero h1 em { color: var(--accent); font-style: normal; }
.history-hero-content > p:last-child { max-width: 440px; color: #c8c8c8; font-size: 13px; line-height: 1.8; }
.history-stamp { position: absolute; right: max(20px,calc((100vw - var(--container))/2)); bottom: 23px; color: #ffffffb3; font-size: 9px; font-weight: 700; letter-spacing: 2px; }
.history-intro { color: var(--ink); background: #fff; }
.history-intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9%; align-items: center; }
.history-intro h2, .sources-inner h2 { margin: 14px 0 0; font: 800 clamp(48px,6.4vw,76px)/.88 var(--font-display); }
.history-intro h2 em, .sources-inner h2 em { color: #b59d00; font-style: normal; }
.history-intro-grid > div:last-child p { color: #6e7476; font-size: 13px; line-height: 1.9; }
.history-intro-grid > div:last-child .history-lead { color: #202526; font-size: 17px; font-weight: 600; line-height: 1.65; }
.history-gallery { padding: 0 0 78px; background: #fff; }
.history-photo-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: 250px; gap: 12px; }
.history-photo { position: relative; overflow: hidden; margin: 0; background: #222; }
.history-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.history-photo:hover img { transform: scale(1.04); }
.history-photo:after { content: ''; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent,#000a); }
.history-photo figcaption { position: absolute; z-index: 1; left: 15px; right: 12px; bottom: 13px; color: white; font-size: 10px; font-weight: 600; letter-spacing: .3px; }
.history-photo-large img { object-position: center 35%; }
.timeline-section { background: var(--charcoal); }
.timeline-layout { display: grid; grid-template-columns: .74fr 1.26fr; gap: 9%; align-items: start; }
.timeline-heading { position: sticky; top: 108px; }
.timeline-heading h2 { margin: 18px 0; font: 800 clamp(55px,6.8vw,80px)/.85 var(--font-display); }
.timeline-heading h2 em { color: var(--accent); font-style: normal; }
.timeline-heading > p:last-child { max-width: 310px; color: #979797; font-size: 12px; line-height: 1.8; }
.timeline { position: relative; padding-left: 31px; border-left: 1px solid #ffffff30; }
.timeline-item { position: relative; display: grid; grid-template-columns: 100px 1fr; gap: 17px; padding: 0 0 31px; }
.timeline-item:before { content: ''; position: absolute; top: 5px; left: -36px; width: 9px; height: 9px; border: 2px solid var(--accent); border-radius: 50%; background: var(--charcoal); }
.timeline-year { color: var(--accent); font: 700 17px/1 var(--font-display); letter-spacing: .4px; }
.timeline-content { padding-bottom: 25px; border-bottom: 1px solid #ffffff1c; }
.timeline-content h3 { margin: -3px 0 8px; color: #fff; font: 700 21px/1.1 var(--font-display); letter-spacing: .35px; text-transform: uppercase; }
.timeline-content p { margin: 0; color: #a9adae; font-size: 12px; line-height: 1.8; }
.timeline-highlight .timeline-content h3 { color: var(--accent); }
.timeline-current .timeline-content { border-bottom: 0; }
.source-link { display: inline-flex; gap: 7px; align-items: center; margin-top: 11px; color: #dedede; font-size: 10px; border-bottom: 1px solid #ffdc007a; padding-bottom: 3px; }
.source-link:hover { color: var(--accent); }
.history-quote { padding: 73px 0; color: var(--ink); background: var(--accent); text-align: center; }
.quote-mark { display: block; height: 43px; font: 800 68px/.9 var(--font-display); }
.history-quote blockquote { max-width: 780px; margin: 10px auto 17px; font: 700 clamp(24px,3vw,37px)/1.22 var(--font-display); text-transform: uppercase; }
.history-quote p { margin: 0; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.history-quote p span { padding: 0 4px; }
.history-sources { color: var(--ink); background: white; }
.sources-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 8%; align-items: center; }
.sources-inner h2 { font-size: clamp(45px,5.5vw,66px); }
.sources-inner ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid #e5e5e5; }
.sources-inner li { border-bottom: 1px solid #e5e5e5; }
.sources-inner li a { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 2px; color: #45494a; font-size: 11px; }
.sources-inner li a:hover { color: #8f7900; }
.sources-inner li i { color: #b59d00; font-size: 9px; }
.history-cta { padding: 55px 0; background: var(--charcoal-2); }
.history-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.history-cta h2 { margin: 12px 0 0; font: 800 clamp(43px,6vw,68px)/.87 var(--font-display); }
.history-cta h2 em { color: var(--accent); font-style: normal; }

@media (min-width: 1500px) { .hero { height: 760px; } }
@media (max-width: 850px) {
  .menu-toggle { display: block; }
  .main-nav { position: absolute; top: 71px; left: 0; right: 0; display: none; align-items: stretch; gap: 0; padding: 10px 20px 20px; background: #0a0c0f; border-bottom: 1px solid #ffffff20; }
  .main-nav.is-open { display: flex; flex-direction: column; }
  .main-nav a { padding: 12px 3px; border-bottom: 1px solid #ffffff12; }
  .main-nav .nav-contact { align-self: flex-start; margin-top: 10px; padding: 9px 12px; border: 1px solid #ffdc0075; }
  .about-grid { gap: 42px; }
  .about-image { height: 390px; }
  .gallery-grid { grid-template-rows: repeat(2, 145px); }
  .timeline-layout { grid-template-columns: 1fr; gap: 38px; }
  .timeline-heading { position: static; }
  .history-intro-grid { gap: 30px; }
  .history-photo-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 185px; }
  .history-photo-large { grid-column: span 2; }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 36px); }
  .section-pad { padding: 60px 0; }
  .hero { min-height: 600px; height: calc(88svh - 72px); max-height: 720px; align-items: center; }
  .hero-bg { background-position: 58% center; }
  .hero-shade { background: linear-gradient(90deg, #080a0de8 0%, #080a0d9c 75%, #080a0d48), linear-gradient(0deg, #080a0d8c, transparent 45%); }
  .hero h1 { font-size: clamp(66px, 17vw, 90px); }
  .hero-intro { max-width: 330px; font-size: 13px; }
  .hero-side-note { right: 11px; font-size: 8px; }
  .scroll-cue { bottom: 17px; font-size: 8px; }
  .about-grid { grid-template-columns: 1fr; gap: 38px; }
  .about-image { height: min(95vw, 390px); margin-right: 11px; }
  .about h2 { font-size: 66px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 25px; }
  .section-heading h2 { font-size: clamp(48px, 12vw, 63px); }
  .section-heading > p { max-width: 330px; }
  .social-cards { grid-template-columns: 1fr; gap: 9px; }
  .social-card { min-height: 75px; }
  .gallery-heading { gap: 10px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 145px); gap: 8px; }
  .gallery-tile.tile-tall { grid-row: span 2; }
  .gallery-grid .gallery-tile:last-child { grid-column: span 2; }
  .gallery-tile > span { opacity: 1; transform: none; }
  .videos .section-heading { align-items: flex-start; }
  .video-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-inner { align-items: flex-start; flex-direction: column; }
  .contact h2 { font-size: 73px; }
  .footer-main { align-items: flex-start; flex-direction: column; }
  .footer-links { gap: 10px 17px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 7px; }
  .history-hero { min-height: 545px; }
  .history-hero-image { background-position: 62% center; }
  .history-hero h1 { font-size: clamp(56px,15vw,78px); }
  .history-back { margin-bottom: 28px; }
  .history-stamp { font-size: 8px; }
  .history-intro-grid, .sources-inner { grid-template-columns: 1fr; gap: 23px; }
  .history-intro h2, .sources-inner h2 { font-size: 58px; }
  .history-gallery { padding-bottom: 57px; }
  .history-photo-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 210px 145px; gap: 8px; }
  .timeline { padding-left: 23px; }
  .timeline-item { grid-template-columns: 72px 1fr; gap: 11px; padding-bottom: 25px; }
  .timeline-item:before { left: -28px; }
  .timeline-year { font-size: 15px; }
  .timeline-content h3 { font-size: 19px; }
  .timeline-content p { font-size: 11px; }
  .history-quote { padding: 55px 0; }
  .history-cta-inner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
