/*
Theme Name: DG Portfolio
Theme URI: https://guptadhanvi.com/
Author: Dhanvi Gupta
Description: Dark portfolio theme for guptadhanvi.com, carrying the design of the original static site into WordPress. Pairs with the Sitecraft Blocks plugin, whose section blocks are retuned to this palette.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: dg-portfolio
*/

/* Tokens lifted from the original static site so the migration is invisible to
   a returning visitor. Change them here and both the theme and the Sitecraft
   blocks follow. */
:root {
	--bg:      #131824;
	--card:    #1d2432;
	--card2:   #232c3d;
	--border:  #323d52;
	--text:    #f4f7fc;
	--muted:   #aeb8cc;
	--accent:  #7d9aff;
	--accent2: #f6ad55;
	--green:   #3ee6b0;
	--wrap:    1080px;
	--radius:  11px;
}

/* Retune the plugin's blocks to this site. The plugin ships a light palette for
   the jewellery sites; everything it draws keys off these. */
:root {
	--sc-ink:    var(--text);
	--sc-deep:   var(--card);
	--sc-accent: var(--accent);
	--sc-muted:  var(--muted);
	--sc-paper:  var(--card2);
	--sc-line:   var(--border);
	--sc-wrap:   var(--wrap);
	--sc-r:      var(--radius);
}
.sc-tone-light { background: var(--bg);   color: var(--text); }
.sc-tone-paper { background: var(--card); color: var(--text); }
.sc-tone-dark  { background: var(--card2); color: var(--text); }
.sc-card       { background: var(--card); border-color: var(--border); }
.sc-btn        { color: #0d1220; }
.sc-stat__v    { color: var(--accent); }

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.65;
	background-image: radial-gradient(ellipse 85% 45% at 50% -10%, rgba(125, 154, 255, .22), transparent);
	background-repeat: no-repeat;
	-webkit-font-smoothing: antialiased;
}

.container {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: 20px;
}

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

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

code, pre {
	font-family: Consolas, 'SF Mono', Menlo, monospace;
	font-size: .92em;
}
pre {
	padding: 16px 18px;
	overflow-x: auto;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
}
code { padding: 2px 6px; border-radius: 5px; background: var(--card2); }
pre code { padding: 0; background: none; }

/* skip link — keyboard users should not have to tab the whole nav */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 10px 16px;
	background: var(--accent);
	color: #0d1220;
	font-weight: 700;
}
.skip-link:focus { left: 8px; top: 8px; }

/* nav ---------------------------------------------------------------------- */

.site-nav {
	position: sticky;
	top: 0;
	z-index: 30;
	background: rgba(19, 24, 36, .88);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
.site-nav .container {
	display: flex;
	align-items: center;
	gap: 22px;
	height: 60px;
}
.site-nav .nm {
	font-weight: 800;
	font-size: 16px;
	text-decoration: none;
	white-space: nowrap;
}
.site-nav .nm span { color: var(--accent); }

.site-nav ul {
	display: flex;
	align-items: center;
	gap: 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-nav a {
	color: var(--muted);
	text-decoration: none;
	font-size: 13.5px;
}
.site-nav a:hover { color: var(--text); }

.site-nav .mail {
	margin-left: auto;
	color: var(--accent);
	font-weight: 600;
	font-size: 13.5px;
	text-decoration: none;
	white-space: nowrap;
}

@media (max-width: 820px) {
	/* the original drops the links rather than opening a burger; keep that */
	.site-nav ul { display: none; }
}

/* page content ------------------------------------------------------------- */

.site-main { padding-block: 44px 72px; }

.entry-title {
	font-size: clamp(30px, 5vw, 48px);
	line-height: 1.1;
	letter-spacing: -.02em;
	margin: 0 0 10px;
	max-width: 840px;
}
.entry-meta {
	margin-bottom: 30px;
	color: var(--muted);
	font-size: 13.5px;
}

.entry-content { max-width: 760px; }
/* the homepage carries its own full-width sections, so let it off the leash */
.is-home .entry-content { max-width: none; }

.entry-content > * + * { margin-top: 1.15em; }
.entry-content h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.1; letter-spacing: -.02em; }
.entry-content h2 { font-size: clamp(23px, 3.2vw, 31px); line-height: 1.2; letter-spacing: -.015em; margin-top: 1.8em; }
.entry-content h3 { font-size: 19px; margin-top: 1.5em; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-bottom: .45em; }
.entry-content p  { color: #dde4f2; }
.entry-content ul, .entry-content ol { padding-left: 1.25em; color: #dde4f2; }
.entry-content li + li { margin-top: .35em; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--text); }

.entry-content blockquote {
	margin-inline: 0;
	padding: 2px 0 2px 18px;
	border-left: 3px solid var(--accent);
	color: var(--muted);
}

.entry-content hr {
	margin-block: 2.4em;
	border: 0;
	border-top: 1px solid var(--border);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14.5px;
}
.entry-content th, .entry-content td {
	padding: 9px 12px;
	border: 1px solid var(--border);
	text-align: left;
}
.entry-content th { background: var(--card); }

/* cards carried over from the original markup, so imported content keeps its look */
.entry-content .card,
.card {
	padding: 20px 22px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
}

.btn {
	padding: 13px 24px;
	border-radius: var(--radius);
	font-size: 14.5px;
	font-weight: 700;
	text-decoration: none;
	transition: .18s;
	display: inline-block;
	cursor: pointer;
	border: 1px solid transparent;
}
.btn.primary { background: var(--accent); color: #0d1220; }
.btn.outline { border-color: var(--border); color: var(--text); }
.btn:hover { transform: translateY(-1px); }

/* listings ----------------------------------------------------------------- */

.card-list {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
	margin-top: 26px;
	padding: 0;
	list-style: none;
}
.card-list li {
	padding: 20px 22px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
	transition: border-color .18s, transform .18s;
}
.card-list li:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-list h2 { margin: 0 0 6px; font-size: 17.5px; line-height: 1.35; }
.card-list h2 a { text-decoration: none; }
.card-list p { margin: 0; color: var(--muted); font-size: 14.5px; }

.pagination { margin-top: 36px; display: flex; gap: 10px; flex-wrap: wrap; }
.pagination .page-numbers {
	padding: 7px 13px;
	border: 1px solid var(--border);
	border-radius: 8px;
	text-decoration: none;
	font-size: 14px;
}
.pagination .current { background: var(--accent); color: #0d1220; border-color: var(--accent); }

/* footer ------------------------------------------------------------------- */

.site-footer {
	margin-top: 60px;
	padding-block: 28px;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 13.5px;
}

/* WordPress core bits ------------------------------------------------------ */

.alignwide   { max-width: 1240px; margin-inline: auto; }
.alignfull   { max-width: none; margin-inline: calc(50% - 50vw); width: 100vw; }
.aligncenter { margin-inline: auto; display: block; }
.wp-caption-text, .wp-element-caption {
	color: var(--muted);
	font-size: 13px;
	text-align: center;
}
.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.btn, .card-list li { transition: none; }
	.btn:hover, .card-list li:hover { transform: none; }
}
