/*
Theme Name: Roy Buana Profile
Theme URI: https://site.roybuana.web.id
Author: Roy Buana
Description: Tema profil pribadi yang bersih dan profesional untuk Roy Buana.
Version: 1.1.0
Text Domain: roybuana-profile
*/

:root {
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: #e2e0d8;
    --paper: #f8f7f4;
    --white: #ffffff;
    --accent: #a9762f;
    --accent-soft: #f3e9da;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 .4em;
    font-weight: 600;
}

p { margin: 0 0 1em; }

.wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(248, 247, 244, .88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 42px; height: 42px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--ink); color: #f6efe3;
    font-family: Georgia, serif; font-size: 17px; letter-spacing: .5px;
}
.brand-name { font-family: Georgia, serif; font-size: 19px; line-height: 1.1; }
.brand-role { display: block; font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.site-nav ul { display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; list-style: none; }
.site-nav a { color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.nav-toggle { display: none; }

/* Hero */
.hero { padding: 92px 0 76px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; right: -160px; top: -120px;
    width: 520px; height: 520px; border-radius: 50%;
    background: radial-gradient(circle, rgba(169, 118, 47, .14), transparent 65%);
}
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: center; position: relative; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 18px; }
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--accent); }
.hero h1 { font-size: clamp(38px, 5.2vw, 64px); letter-spacing: -.02em; margin-bottom: 18px; }
.hero .lede { font-size: 18px; color: var(--ink-soft); max-width: 56ch; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font-size: 14px; font-weight: 600; border: 1px solid transparent; transition: .18s ease; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1e293b; text-decoration: none; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--white); }
.btn-ghost:hover { border-color: var(--ink); text-decoration: none; }

.portrait-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.portrait { aspect-ratio: 4 / 5; border-radius: 12px; background: linear-gradient(160deg, #1e293b, #0f172a); color: #f6efe3; display: grid; place-items: center; font-family: Georgia, serif; font-size: 64px; letter-spacing: .04em; }
.portrait-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #2f9e6b; display: inline-block; margin-right: 6px; }

/* Sections */
.section { padding: 84px 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 0; }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 46ch; }
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 10px; }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }
.about-copy { font-size: 17px; color: var(--ink-soft); }
.facts { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.facts dl { margin: 0; display: grid; gap: 16px; }
.facts dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.facts dd { margin: 0; font-weight: 500; color: var(--ink); word-break: break-word; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d6d2c6; }
.card .num { font-family: Georgia, serif; font-size: 13px; color: var(--accent); letter-spacing: .08em; }
.card h3 { font-size: 20px; margin: 10px 0 8px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); }

.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.post-card .body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-meta { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.post-card h3 { font-size: 20px; margin: 0; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { text-decoration: none; color: var(--accent); }
.post-card .excerpt { font-size: 14px; color: var(--muted); margin: 0; }
.post-card .more { margin-top: auto; font-size: 13px; font-weight: 600; }

.contact-band { background: var(--ink); color: #e7e5df; border-radius: var(--radius); padding: 56px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.contact-band h2 { color: #fff; font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 12px; }
.contact-band p { color: #b9c0cd; margin: 0; }
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-links a { color: #f6efe3; border-bottom: 1px solid rgba(255, 255, 255, .22); padding-bottom: 10px; display: flex; justify-content: space-between; font-size: 15px; }
.contact-links a:hover { text-decoration: none; border-color: #fff; }

/* Content pages */
.page-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(32px, 4vw, 48px); margin: 0; }
.entry { padding: 56px 0 84px; }
.entry .content { max-width: 760px; font-size: 17px; color: var(--ink-soft); }
.entry .content h2, .entry .content h3 { margin-top: 1.6em; }
.entry .content blockquote { margin: 1.6em 0; padding: 18px 24px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; }
.entry .content img { border-radius: 12px; margin: 1.4em 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; background: var(--paper); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); }
.footer-inner a { color: var(--ink-soft); }
.footer-nav ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }

/* WP basics */
.alignwide { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

@media (max-width: 960px) {
    .hero-grid, .about-grid, .contact-band { grid-template-columns: 1fr; }
    .cards, .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { padding: 64px 0 56px; }
}

@media (max-width: 680px) {
    .wrap { width: calc(100% - 32px); }
    .site-nav { display: none; }
    .site-nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); }
    .site-nav.is-open ul { flex-direction: column; gap: 0; padding: 8px 16px; }
    .site-nav.is-open li { border-bottom: 1px solid var(--line); }
    .site-nav.is-open li:last-child { border-bottom: 0; }
    .site-nav.is-open a { display: block; padding: 14px 0; }
    .nav-toggle { display: inline-flex; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 13px; cursor: pointer; }
    .cards, .posts { grid-template-columns: 1fr; }
    .contact-band { padding: 32px 24px; }
    .section { padding: 60px 0; }
}

/* Dropdown menu (About Me / Competencies / Research) */
.site-nav li { position: relative; }
.site-nav .sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: -14px;
    min-width: 220px;
    display: none;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 10px;
    list-style: none;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    z-index: 30;
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu { display: flex; }
.site-nav .sub-menu li { width: 100%; }
.site-nav .sub-menu a { display: block; padding: 10px 12px; border-radius: 9px; font-size: 14px; white-space: nowrap; }
.site-nav .sub-menu a:hover { background: var(--accent-soft); color: #8a5f21; }
.site-nav .menu-item-has-children > a::after { content: "\25BE"; margin-left: 6px; font-size: 10px; color: var(--muted); }
.site-nav .sub-menu .menu-item-has-children > a::after { content: ""; }
.submenu-toggle { display: none; }

@media (max-width: 680px) {
    .site-nav.is-open .sub-menu { position: static; display: none; min-width: 0; padding: 0 0 0 16px; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
    .site-nav.is-open li.is-open > .sub-menu { display: flex; }
    .site-nav .sub-menu a { white-space: normal; }
    .site-nav .menu-item-has-children > a::after { content: ""; }
    .site-nav li.has-toggle > a { padding-right: 46px; }
    .submenu-toggle {
        display: grid; place-items: center;
        position: absolute; right: 0; top: 0;
        width: 46px; height: 46px;
        background: none; border: 0; padding: 0;
        color: var(--ink-soft); font-size: 15px; line-height: 1;
        cursor: pointer;
    }
    .submenu-toggle[aria-expanded="true"] { transform: rotate(180deg); }
}
